]> git.0d.be Git - empathy.git/commitdiff
Don't try to register for unique bus names in remote instances of empathy-av.
authorTravis Reitter <travis.reitter@collabora.co.uk>
Fri, 22 Oct 2010 20:05:54 +0000 (13:05 -0700)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Fri, 29 Oct 2010 16:35:09 +0000 (09:35 -0700)
src/empathy-av.c

index ee6d4414f392555c4f7cfcf173a250108777b4a7..374b947a73688fb0a538b4106f14bfa86892a7a3 100644 (file)
@@ -58,10 +58,26 @@ activate_cb (GApplication *application)
 {
   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);
     }
 }
 
@@ -96,7 +112,6 @@ main (int argc,
 #ifdef ENABLE_DEBUG
   TpDebugSender *debug_sender;
 #endif
-  EmpathyCallFactory *call_factory;
   GError *error = NULL;
 
   /* Init */
@@ -133,19 +148,6 @@ main (int argc,
   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");
@@ -161,7 +163,6 @@ main (int argc,
   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);