summaryrefslogtreecommitdiff
path: root/src/muc-channel.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-03-23 19:16:25 -0400
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-07-20 12:19:12 +0100
commit87fc93eba8527d5c183c0121190ac75d07f39beb (patch)
tree973a0e5d3ef2ed78b280b777000270a64d2928e1 /src/muc-channel.c
parent64cf190a7fc4ed8e8bbd340c9581e3ddfff9d4e6 (diff)
downloadtelepathy-gabble-87fc93eba8527d5c183c0121190ac75d07f39beb.tar.gz
muc-channel: store Tube channels here
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src/muc-channel.c')
-rw-r--r--src/muc-channel.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/muc-channel.c b/src/muc-channel.c
index 33bc04bd8..c70912d50 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -206,6 +206,9 @@ struct _GabbleMucChannelPrivate
WockyMuc *wmuc;
GabbleTubesChannel *tube;
+ /* tube ID => owned GabbleTubeIface */
+ GHashTable *tubes;
+
#ifdef ENABLE_VOIP
/* Current active call */
GabbleCallMucChannel *call;
@@ -239,6 +242,9 @@ gabble_muc_channel_init (GabbleMucChannel *self)
self->priv = priv;
priv->requests_cancellable = g_cancellable_new ();
+
+ priv->tubes = g_hash_table_new_full (g_direct_hash, g_direct_equal,
+ NULL, (GDestroyNotify) g_object_unref);
}
static TpHandle create_room_identity (GabbleMucChannel *)
@@ -1233,6 +1239,8 @@ gabble_muc_channel_dispose (GObject *object)
tp_clear_object (&priv->requests_cancellable);
tp_clear_object (&priv->room_config);
+ tp_clear_pointer (&priv->tubes, g_hash_table_unref);
+
if (G_OBJECT_CLASS (gabble_muc_channel_parent_class)->dispose)
G_OBJECT_CLASS (gabble_muc_channel_parent_class)->dispose (object);
}
@@ -1485,7 +1493,7 @@ close_channel (GabbleMucChannel *chan, const gchar *reason,
/* Ensure we stay alive even while telling everyone else to abandon us. */
g_object_ref (chan);
- gabble_muc_channel_close_tube (chan);
+ g_hash_table_remove_all (priv->tubes);
#ifdef ENABLE_VOIP
muc_call_channel_finish_requests (chan, NULL, &error);