[telepathy-gabble/master] Try to pick globally-unique content names.

Will Thompson will.thompson at collabora.co.uk
Thu Jun 18 11:21:16 PDT 2009


While it's completely correct for the responder to add a stream called
'stream1' even though the initiator has a stream called 'stream1'
already, it makes the debugging output harder to read, and confuses
0.7.16 <= Gabble <= 0.7.28.
---
 src/jingle-session.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/jingle-session.c b/src/jingle-session.c
index decc96e..2d129cb 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -2003,7 +2003,8 @@ gabble_jingle_session_add_content (GabbleJingleSession *sess, JingleMediaType mt
       g_free (name);
       name = g_strdup_printf ("stream%d", id++);
     }
-  while (g_hash_table_lookup (contents, name) != NULL);
+  while (g_hash_table_lookup (priv->initiator_contents, name) != NULL
+      && g_hash_table_lookup (priv->responder_contents, name) != NULL);
 
   content_type = gabble_jingle_factory_lookup_content_type (
       priv->conn->jingle_factory, content_ns);
-- 
1.5.6.5




More information about the telepathy-commits mailing list