[Telepathy-commits] [telepathy-salut/master] iq_tube_request_cb: announce the tubes channel only if it has just been created
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Mar 11 07:06:38 PDT 2009
---
src/salut-tubes-manager.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/salut-tubes-manager.c b/src/salut-tubes-manager.c
index 24cdf22..0e1824b 100644
--- a/src/salut-tubes-manager.c
+++ b/src/salut-tubes-manager.c
@@ -356,6 +356,7 @@ iq_tube_request_cb (SalutXmppConnectionManager *xcm,
{
SalutTubeIface *tube;
GHashTable *channels;
+ gboolean tubes_channel_created = FALSE;
if (chan == NULL)
{
@@ -368,7 +369,10 @@ iq_tube_request_cb (SalutXmppConnectionManager *xcm,
{
DEBUG ("couldn't make new tubes channel: %s", e->message);
g_error_free (e);
+ return;
}
+
+ tubes_channel_created = TRUE;
}
tube = salut_tubes_channel_message_received (chan, service, tube_type,
@@ -377,7 +381,10 @@ iq_tube_request_cb (SalutXmppConnectionManager *xcm,
/* announce tubes and tube channels */
channels = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, NULL);
- g_hash_table_insert (channels, chan, NULL);
+
+ if (tubes_channel_created)
+ g_hash_table_insert (channels, chan, NULL);
+
if (tube != NULL)
g_hash_table_insert (channels, tube, NULL);
--
1.5.6.5
More information about the telepathy-commits
mailing list