Skip to content
Snippets Groups Projects
Commit 21f63096 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

config-endpoint: destroy the endpoint when its associated node is destroyed

parent 5ea7e6fc
No related branches found
No related tags found
No related merge requests found
......@@ -207,6 +207,15 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, gpointer d)
streams_data ? g_steal_pointer (&streams_ep) : g_steal_pointer (&ep));
}
static void
on_node_removed (WpObjectManager *om, WpProxy *proxy, gpointer d)
{
WpConfigEndpointContext *self = d;
/* Remove the endpoint */
g_hash_table_remove (self->endpoints, proxy);
}
static void
wp_config_endpoint_context_activate (WpPlugin * plugin)
{
......@@ -243,6 +252,8 @@ wp_config_endpoint_context_activate (WpPlugin * plugin)
WP_PROXY_FEATURES_STANDARD);
g_signal_connect_object (self->nodes_om, "object-added",
G_CALLBACK (on_node_added), self, 0);
g_signal_connect_object (self->nodes_om, "object-removed",
G_CALLBACK (on_node_removed), self, 0);
wp_core_install_object_manager (core, self->nodes_om);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment