{
if (!use_timer && !activated)
{
+ EmpathyCallFactory *call_factory;
+ GError *error = NULL;
+
/* keep a 'ref' to the application */
g_application_hold (G_APPLICATION (app));
+ call_factory = empathy_call_factory_initialise ();
+
+ g_signal_connect (G_OBJECT (call_factory), "new-call-handler",
+ G_CALLBACK (new_call_handler_cb), NULL);
+
+ if (!empathy_call_factory_register (call_factory, &error))
+ {
+ g_critical ("Failed to register Handler: %s", error->message);
+ g_error_free (error);
+ }
+
activated = TRUE;
+
+ g_object_unref (call_factory);
}
}
#ifdef ENABLE_DEBUG
TpDebugSender *debug_sender;
#endif
- EmpathyCallFactory *call_factory;
GError *error = NULL;
/* Init */
g_log_set_default_handler (tp_debug_sender_log_handler, G_LOG_DOMAIN);
#endif
- call_factory = empathy_call_factory_initialise ();
-
- g_signal_connect (G_OBJECT (call_factory), "new-call-handler",
- G_CALLBACK (new_call_handler_cb), NULL);
-
- if (!empathy_call_factory_register (call_factory, &error))
- {
- g_critical ("Failed to register Handler: %s", error->message);
- g_error_free (error);
- }
-
- g_object_unref (call_factory);
-
if (g_getenv ("EMPATHY_PERSIST") != NULL)
{
DEBUG ("Disable timer");
g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
- g_object_unref (call_factory);
#ifdef ENABLE_DEBUG
g_object_unref (debug_sender);