[empathy: 6/13] tp-call: use tp_g_signal_connect_object to connect signal on the channel



commit 57459c6892de159e92a90231e8c10e63c566ac32
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Jun 22 11:20:32 2010 +0200

    tp-call: use tp_g_signal_connect_object to connect signal on the channel
    
    This ensure that the cb won't be called after the TpCall has been destroyed.

 libempathy/empathy-tp-call.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index 9758f50..dfaf338 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -25,6 +25,7 @@
 #include <telepathy-glib/proxy-subclass.h>
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/util.h>
 
 #include "empathy-tp-call.h"
 #include "empathy-tp-contact-factory.h"
@@ -436,8 +437,8 @@ tp_call_constructor (GType type,
 
   /* Update status when members changes */
   tp_call_update_status (call);
-  g_signal_connect_swapped (priv->channel, "group-members-changed",
-      G_CALLBACK (tp_call_update_status), call);
+  tp_g_signal_connect_object (priv->channel, "group-members-changed",
+      G_CALLBACK (tp_call_update_status), call, G_CONNECT_SWAPPED);
 
   return object;
 }



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