]> git.0d.be Git - empathy.git/commitdiff
Avoid a string dup.
authorXavier Claessens <xclaesse@src.gnome.org>
Fri, 21 Nov 2008 16:25:07 +0000 (16:25 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 21 Nov 2008 16:25:07 +0000 (16:25 +0000)
svn path=/trunk/; revision=1912

src/empathy.c

index fc9640556d54e8e0827aeaee36641cc6ba37589d..b1ea60018c02dbfdeae099710cb597b0a997e484 100644 (file)
@@ -65,9 +65,9 @@ dispatch_channel_cb (EmpathyDispatcher *dispatcher,
                     TpChannel         *channel,
                     gpointer           user_data)
 {
-       gchar *channel_type;
+       const gchar *channel_type;
 
-       g_object_get (channel, "channel-type", &channel_type, NULL);
+       channel_type = tp_channel_get_channel_type (channel);
        if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT)) {
                EmpathyTpChat *tp_chat;
                EmpathyChat   *chat = NULL;
@@ -115,8 +115,6 @@ dispatch_channel_cb (EmpathyDispatcher *dispatcher,
                empathy_tp_file_keep_alive (tp_file);
                g_object_unref (tp_file);
        }
-
-       g_free (channel_type);
 }
 
 static void