[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ladcca] Problems with LASH
From: |
Bob Ham |
Subject: |
Re: [ladcca] Problems with LASH |
Date: |
Sun, 05 Jun 2005 23:37:48 +0100 |
On Wed, 2005-06-01 at 18:07 +1000, Dave Robillard wrote:
> > This is very strange; the client doesn't exist from the server's
> > perspective until it calls cca_init, except in a ghosted state, and I
> > don't think it's even possible for it to send events to those clients.
> > The fact that it thinks there's a connection with an ID of 10 makes me
> > think that wires are getting crossed with a different client. I would
> > offer to take a look at it, but I don't have a LASH development
> > environment set up at the moment.
>
> I think that's the exact problem - it /doesn't/ think there's a client
> with connection ID 10. I havn't had time to look at the lash code
> throughly yet, but I assume what is happening is:
>
> - User asks lash to restore a session
> - Lash laucnhes app with ID 10
> - Lash sends events to ID 10
> - App registers with cca_init
The connection IDs aren't like client IDs; it's purely internal to the
server. It's just a static integer that gets incremented on each
connection.
> The last 3 steps being a race condition. Sometimes the last two events
> are reversed in order, and everything works fine. (It's not just my
> client BTW, the same happens with the example synth client at least)
>
> So, what I'd like to know is: does lash wait for cca_init to happen on
> project restore after launching a client, or does it just launch it and
> assume it can then start sending configuration values around?
Basically, yes. Within the server, after a restore all of the clients
are "lost" clients until they are restored. This can happen by a client
connecting in the same class as the lost client (eg, the "LADCCA Synth"
class) or by a client connecting with the same client ID. During a
restore, the clients are started and told to use a specific client ID,
so if all goes well, the correct "lost" client will be restored.
Lost clients don't have connections. When a client connects (with
cca_init,) a new connection ID is created on the server and that is used
to refer to it. The client may later be used to restore a lost client
or added as a new one.
> Armed with that information, and maybe some helpful pointers to the
> relevant areas of the code (if you can still pop that off the top of
> your head) I'll see what I can do about fixing it.
Probably ladcca.c on the client side, conn_mgr.c, server.c and possibly
client.c on the server side.
Hope that helps,
Bob
--
Bob Ham <address@hidden>
signature.asc
Description: This is a digitally signed message part