[Telepathy-commits] [telepathy-gabble/master] create_new_tube: don't call update_tubes_presence if the tube is not open yet

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Mon Jan 19 04:59:47 PST 2009


---
 src/tubes-channel.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/tubes-channel.c b/src/tubes-channel.c
index 506e3c5..c829580 100644
--- a/src/tubes-channel.c
+++ b/src/tubes-channel.c
@@ -551,10 +551,15 @@ create_new_tube (GabbleTubesChannel *self,
 
   DEBUG ("create tube %u", tube_id);
   g_hash_table_insert (priv->tubes, GUINT_TO_POINTER (tube_id), tube);
-  update_tubes_presence (self);
 
   g_object_get (tube, "state", &state, NULL);
 
+  if (state == GABBLE_TUBE_CHANNEL_STATE_OPEN)
+    {
+      /* FIXME: does it still make sense to call it here? */
+      update_tubes_presence (self);
+    }
+
   /* The old API doesn't know the "not offered" state, so we have to wait that
    * the tube is offered before announcing it. */
   if (state != GABBLE_TUBE_CHANNEL_STATE_NOT_OFFERED)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list