[telepathy-gabble/master] Document assumptions for missing @creator workaround

Will Thompson will.thompson at collabora.co.uk
Fri Jun 19 02:22:37 PDT 2009


---
 src/jingle-session.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/jingle-session.c b/src/jingle-session.c
index 2d129cb..835314b 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -597,6 +597,13 @@ lookup_content (GabbleJingleSession *sess,
        * We try to detect contacts using such a version of Gabble from their
        * caps; if 'creator' is missing and the peer has that caps flag, we look
        * up the content in both hashes.
+       *
+       * While this doesn't deal with the case where the content is found in
+       * both hashes, this isn't a problem in practice: the versions of Gabble
+       * we're working around didn't allow this to happen (they'd either reject
+       * the second stream, or let it replace the first, depending on the phase
+       * of the moon, and get kind of confused in the process), and we try to
+       * pick globally-unique content names.
        */
       GabblePresence *presence = gabble_presence_cache_get (
           priv->conn->presence_cache, sess->peer);
@@ -605,7 +612,7 @@ lookup_content (GabbleJingleSession *sess,
           gabble_presence_resource_has_caps (presence, priv->peer_resource,
               PRESENCE_CAP_JINGLE_OMITS_CONTENT_CREATOR))
         {
-          DEBUG ("working around missing 'creator'");
+          DEBUG ("working around missing 'creator' attribute");
 
           *c = g_hash_table_lookup (priv->initiator_contents, name);
 
-- 
1.5.6.5



More information about the telepathy-commits mailing list