diff options
Diffstat (limited to 'extensions/extensions-cli.c')
-rw-r--r-- | extensions/extensions-cli.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/extensions/extensions-cli.c b/extensions/extensions-cli.c index 354f4c6dd..9a72da148 100644 --- a/extensions/extensions-cli.c +++ b/extensions/extensions-cli.c @@ -9,17 +9,23 @@ static void _emp_ext_register_dbus_glib_marshallers (void); #include "_gen/cli-misc-body.h" #include "_gen/register-dbus-glib-marshallers-body.h" +static gpointer +emp_cli_once (gpointer data) +{ + _emp_ext_register_dbus_glib_marshallers (); + + tp_proxy_init_known_interfaces (); + + tp_proxy_or_subclass_hook_on_interface_add (TP_TYPE_PROXY, + emp_cli_misc_add_signals); + + return NULL; +} + void emp_cli_init (void) { - static gboolean initialized = FALSE; - - if (!initialized) - { - _emp_ext_register_dbus_glib_marshallers (); + static GOnce once = G_ONCE_INIT; - tp_proxy_or_subclass_hook_on_interface_add (TP_TYPE_PROXY, - emp_cli_misc_add_signals); - initialized = TRUE; - } + g_once (&once, emp_cli_once, NULL); } |