soc.2009.telepathy: e6652c44: Unref channel proxy on invalidated signa...

sttwister at soc.pidgin.im sttwister at soc.pidgin.im
Mon Jun 8 15:30:34 EDT 2009


-----------------------------------------------------------------
Revision: e6652c448065116aafd45019ece2175846328b53
Ancestor: 885e3c28a89a2d3b888a861127a9b347751a131d
Author: sttwister at soc.pidgin.im
Date: 2009-06-08T18:53:04
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/e6652c448065116aafd45019ece2175846328b53

Modified files:
        libpurple/protocols/telepathy/telepathy.c

ChangeLog: 

Unref channel proxy on invalidated signal

-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy.c	50ddc066ee77e57a5f07b9b2e4cec503c279f16b
+++ libpurple/protocols/telepathy/telepathy.c	df9abd4920c56d5039690f2690a0902c6efd8f03
@@ -526,6 +526,18 @@ static void
 }
 
 static void
+channel_invalidated_cb (TpProxy *self,
+                        guint    domain,
+                        gint     code,
+                        gchar   *message,
+                        gpointer user_data)
+{
+	purple_debug_info("telepathy", "Channel invalidated: %s\n", message);	
+
+	g_object_unref(self);
+}
+
+static void
 handle_new_channel (PurplePlugin* plugin,
                     const GValueArray *channel_Properties)
 {
@@ -546,6 +558,8 @@ handle_new_channel (PurplePlugin* plugin
 	purple_debug_info("telepathy", "New channel: %s\n", object_Path);
 
 	tp_channel_call_when_ready(channel, channel_ready_cb, plugin);
+
+	g_signal_connect(channel, "invalidated", G_CALLBACK (channel_invalidated_cb), plugin);
 }
 
 static void


More information about the Commits mailing list