NSM: Don't allow 'added' clients to replace stopped clients.
This commit is contained in:
parent
57ac27ecac
commit
ae5879a20e
|
@ -82,7 +82,8 @@ enum {
|
||||||
COMMAND_QUIT,
|
COMMAND_QUIT,
|
||||||
COMMAND_KILL,
|
COMMAND_KILL,
|
||||||
COMMAND_SAVE,
|
COMMAND_SAVE,
|
||||||
COMMAND_OPEN
|
COMMAND_OPEN,
|
||||||
|
COMMAND_START
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Client
|
struct Client
|
||||||
|
@ -568,6 +569,7 @@ launch ( const char *executable, const char *client_id )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->pending_command( COMMAND_START );
|
||||||
c->pid = pid;
|
c->pid = pid;
|
||||||
|
|
||||||
MESSAGE( "Process has pid: %i", pid );
|
MESSAGE( "Process has pid: %i", pid );
|
||||||
|
@ -743,8 +745,9 @@ OSC_HANDLER( announce )
|
||||||
i != client.end();
|
i != client.end();
|
||||||
++i )
|
++i )
|
||||||
{
|
{
|
||||||
if ( ! strcmp( (*i)->executable_path, executable_path )
|
if ( ! strcmp( (*i)->executable_path, executable_path ) &&
|
||||||
&& ! (*i)->active )
|
! (*i)->active &&
|
||||||
|
(*i)->pending_command() == COMMAND_START )
|
||||||
{
|
{
|
||||||
// I think we've found the slot we were looking for.
|
// I think we've found the slot we were looking for.
|
||||||
MESSAGE( "Client was expected." );
|
MESSAGE( "Client was expected." );
|
||||||
|
|
Loading…
Reference in New Issue