]> git.0d.be Git - empathy.git/commitdiff
Disconnect invalidated signal from stream-engine when media channel is closed. Fixes...
authorXavier Claessens <xclaesse@src.gnome.org>
Sat, 22 Mar 2008 19:25:33 +0000 (19:25 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sat, 22 Mar 2008 19:25:33 +0000 (19:25 +0000)
svn path=/trunk/; revision=822

libempathy/empathy-tp-call.c

index fa705ceada8e759d84f38c6773e1add834dcb185..507ade0221704d2bd1a02e31c4bd85f596d16650 100644 (file)
@@ -225,6 +225,18 @@ tp_call_stream_removed_cb (DBusGProxy *channel,
     }
 }
 
+static void
+tp_call_invalidated_cb (TpProxy       *stream_engine,
+                        GQuark         domain,
+                        gint           code,
+                        gchar         *message,
+                        EmpathyTpCall *call)
+{
+  empathy_debug (DEBUG_DOMAIN, "Stream engine proxy invalidated: %s",
+      message);
+  empathy_tp_call_close_channel (call);
+}
+
 static void
 tp_call_channel_closed_cb (TpChan *channel,
                            EmpathyTpCall *call)
@@ -251,6 +263,14 @@ tp_call_channel_closed_cb (TpChan *channel,
       G_CALLBACK (tp_call_stream_added_cb), call);
   dbus_g_proxy_disconnect_signal (streamed_iface, "StreamRemoved",
       G_CALLBACK (tp_call_stream_removed_cb), call);
+
+  if (priv->stream_engine)
+    {
+      g_signal_handlers_disconnect_by_func (priv->stream_engine,
+          tp_call_invalidated_cb, call);
+      g_object_unref (priv->stream_engine);
+      priv->stream_engine = NULL;
+    }
 }
 
 static void
@@ -498,18 +518,6 @@ tp_call_async_cb (TpProxy *proxy,
     }
 }
 
-static void
-tp_call_invalidated_cb (TpProxy       *stream_engine,
-                        GQuark         domain,
-                        gint           code,
-                        gchar         *message,
-                        EmpathyTpCall *call)
-{
-  empathy_debug (DEBUG_DOMAIN, "Stream engine proxy invalidated: %s",
-      message);
-  empathy_tp_call_close_channel (call);
-}
-
 static void
 tp_call_watch_name_owner_cb (TpDBusDaemon *daemon,
                              const gchar *name,