NSM: Don't forget to inform GUI of the removal of stopped clients when closing a session.
This commit is contained in:
parent
cdcc61d75b
commit
1cdc62416d
|
@ -246,22 +246,23 @@ handle_client_process_death ( int pid )
|
||||||
|
|
||||||
c->pending_command = COMMAND_NONE;
|
c->pending_command = COMMAND_NONE;
|
||||||
|
|
||||||
if ( gui_is_active )
|
|
||||||
{
|
|
||||||
if ( ! c->dead_because_we_said )
|
|
||||||
osc_server->send( gui_addr, "/nsm/gui/client/status", c->client_id, c->status = "stopped" );
|
|
||||||
else
|
|
||||||
osc_server->send( gui_addr, "/nsm/gui/client/status", c->client_id, c->status = "removed" );
|
|
||||||
}
|
|
||||||
|
|
||||||
c->active = false;
|
c->active = false;
|
||||||
c->pid = 0;
|
c->pid = 0;
|
||||||
|
|
||||||
if ( c->dead_because_we_said )
|
if ( c->dead_because_we_said )
|
||||||
{
|
{
|
||||||
|
if ( gui_is_active )
|
||||||
|
osc_server->send( gui_addr, "/nsm/gui/client/status", c->client_id, c->status = "removed" );
|
||||||
|
|
||||||
client.remove( c );
|
client.remove( c );
|
||||||
|
|
||||||
delete c;
|
delete c;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( gui_is_active )
|
||||||
|
osc_server->send( gui_addr, "/nsm/gui/client/status", c->client_id, c->status = "stopped" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,7 +584,11 @@ purge_inactive_clients ( )
|
||||||
{
|
{
|
||||||
if ( ! (*i)->active )
|
if ( ! (*i)->active )
|
||||||
{
|
{
|
||||||
|
if ( gui_is_active )
|
||||||
|
osc_server->send( gui_addr, "/nsm/gui/client/status", (*i)->client_id, (*i)->status = "removed" );
|
||||||
|
|
||||||
delete *i;
|
delete *i;
|
||||||
|
|
||||||
i = client.erase( i );
|
i = client.erase( i );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue