[empathy] Don't try to register for unique bus names in remote instances of empathy-av.



commit ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a
Author: Travis Reitter <travis reitter collabora co uk>
Date:   Fri Oct 22 13:05:54 2010 -0700

    Don't try to register for unique bus names in remote instances of empathy-av.

 src/empathy-av.c |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/src/empathy-av.c b/src/empathy-av.c
index ee6d441..374b947 100644
--- a/src/empathy-av.c
+++ b/src/empathy-av.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]