track client resources

This commit is contained in:
Wim Taymans 2016-11-15 17:06:09 +01:00
parent 0d21d633c9
commit b6ad45bb74
14 changed files with 253 additions and 92 deletions

View file

@ -399,7 +399,6 @@ handle_remove (PinosNode1 *interface,
PinosNode *this = user_data;
pinos_log_debug ("node %p: remove", this);
pinos_node_destroy (this);
g_dbus_method_invocation_return_value (invocation,
g_variant_new ("()"));
@ -585,9 +584,10 @@ do_node_remove (SpaPoll *poll,
* Remove @node. This will stop the transfer on the node and
* free the resources allocated by @node.
*/
void
SpaResult
pinos_node_destroy (PinosNode * this)
{
SpaResult res;
PinosNodeImpl *impl = SPA_CONTAINER_OF (this, PinosNodeImpl, this);
pinos_log_debug ("node %p: destroy", impl);
@ -596,12 +596,13 @@ pinos_node_destroy (PinosNode * this)
spa_list_remove (&this->list);
pinos_core_remove_global (this->core, this->global);
spa_poll_invoke (&this->data_loop->poll,
do_node_remove,
impl->seq++,
0,
NULL,
this);
res = spa_poll_invoke (&this->data_loop->poll,
do_node_remove,
impl->seq++,
0,
NULL,
this);
return res;
}
/**