From 6c7b2aa5c1581f9e40cfdc38f67fe7f479a745b5 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 21 Nov 2008 16:25:07 +0000 Subject: [PATCH] Avoid a string dup. svn path=/trunk/; revision=1912 --- src/empathy.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/empathy.c b/src/empathy.c index fc964055..b1ea6001 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -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 -- 2.39.2