module-session: export session after the core is connected

wp_exported_export() used to do that internally, but it's cleaner
to do it this way now
This commit is contained in:
George Kiagiadakis 2020-02-13 19:57:16 +02:00
parent 753e708544
commit 87cc64b40b

View file

@ -105,6 +105,13 @@ on_endpoint_removed (WpObjectManager * om, WpEndpoint * ep,
select_new_default_ep (data, type, media_class, ep_id);
}
static void
export_session (WpImplSession * session)
{
wp_proxy_augment (WP_PROXY (session),
WP_PROXY_FEATURE_BOUND, NULL, NULL, NULL);
}
static void
module_destroy (gpointer d)
{
@ -125,8 +132,8 @@ wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args)
data->session = wp_impl_session_new (core);
wp_impl_session_set_property (data->session,
PW_KEY_SESSION_ID, "wireplumber");
wp_proxy_augment (WP_PROXY (data->session), WP_PROXY_FEATURE_BOUND,
NULL, NULL, NULL);
g_signal_connect_object (core, "connected", (GCallback) export_session,
data->session, G_CONNECT_SWAPPED);
data->om = wp_object_manager_new ();
g_signal_connect (data->om, "object-added",