[telepathy-mission-control/master] _mcd_channel_close: don't close old Tubes channels
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Sep 7 07:25:48 PDT 2009
---
src/mcd-channel.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index 5e85fc0..f00cedb 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -253,6 +253,7 @@ _mcd_channel_close (McdChannel *channel)
{
McdChannelPrivate *priv = MCD_CHANNEL_PRIV (channel);
const GError *invalidated;
+ GQuark channel_type;
if (priv->tp_chan == NULL)
{
@@ -270,13 +271,20 @@ _mcd_channel_close (McdChannel *channel)
return;
}
- if (tp_channel_get_channel_type_id (priv->tp_chan) ==
- TP_IFACE_QUARK_CHANNEL_TYPE_CONTACT_LIST)
+ channel_type = tp_channel_get_channel_type_id (priv->tp_chan);
+
+ if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CONTACT_LIST)
{
DEBUG ("Not closing %p, it's a ContactList", channel);
return;
}
+ if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_TUBES)
+ {
+ DEBUG ("Not closing %p, it's an old Tubes channel", channel);
+ return;
+ }
+
DEBUG ("%p: calling Close() on %s", channel,
mcd_channel_get_object_path (channel));
tp_cli_channel_call_close (priv->tp_chan, -1, NULL, NULL, NULL, NULL);
--
1.5.6.5
More information about the telepathy-commits
mailing list