[telepathy-gabble/master] For gtalk dialects force the uses of google p2p

Sjoerd Simons sjoerd.simons at collabora.co.uk
Sat Sep 12 14:05:00 PDT 2009


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

diff --git a/src/media-channel.c b/src/media-channel.c
index ef028db..e37bbf4 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -1485,17 +1485,17 @@ _pick_best_resource (GabbleMediaChannel *chan,
 
 CHOOSE_TRANSPORT:
 
-  *transport_ns = gabble_presence_resource_pick_best_feature (presence,
-      resource, transports, gabble_capability_set_predicate_has);
 
-  if (*transport_ns == NULL && (*dialect == JINGLE_DIALECT_GTALK4
-      || *dialect == JINGLE_DIALECT_GTALK3))
+  if (*dialect == JINGLE_DIALECT_GTALK4 || *dialect == JINGLE_DIALECT_GTALK3)
     {
-      /* (Some) GTalk clients don't advertise gtalk-p2p, though
-       * they support it. If we know it's GTalk and there's no
-       * transport, we can assume it also. */
+      /* the GTalk dialects only support google p2p as transport protocol. */
       *transport_ns = NS_GOOGLE_TRANSPORT_P2P;
     }
+  else
+    {
+      *transport_ns = gabble_presence_resource_pick_best_feature (presence,
+        resource, transports, gabble_capability_set_predicate_has);
+    }
 
   if (*transport_ns == NULL)
     resource = NULL;
-- 
1.5.6.5



More information about the telepathy-commits mailing list