[telepathy-gabble/master] We can only do GTalk3 video if both audio and video are wanted

Sjoerd Simons sjoerd.simons at collabora.co.uk
Thu Jun 25 09:59:38 PDT 2009


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

diff --git a/src/media-channel.c b/src/media-channel.c
index 5050e3d..c7c71e4 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -1385,14 +1385,18 @@ _pick_best_resource (GabbleMediaChannel *chan,
       goto CHOOSE_TRANSPORT;
     }
 
-  /* There is still hope, try GTalk */
-  caps = PRESENCE_CAP_GOOGLE_VIDEO | PRESENCE_CAP_GOOGLE_VOICE;
-  resource = gabble_presence_pick_resource_by_caps (presence, caps);
-
-  if (resource != NULL)
+  /* There is still hope, try GTalk, but only when asked for both audio and
+   * video */
+  if (want_audio && want_video)
     {
-      *dialect = JINGLE_DIALECT_GTALK3;
-      goto CHOOSE_TRANSPORT;
+      caps = PRESENCE_CAP_GOOGLE_VIDEO | PRESENCE_CAP_GOOGLE_VOICE;
+      resource = gabble_presence_pick_resource_by_caps (presence, caps);
+
+      if (resource != NULL)
+        {
+          *dialect = JINGLE_DIALECT_GTALK3;
+          goto CHOOSE_TRANSPORT;
+        }
     }
 
   /* In this unlikely case, we can get by with just video */
-- 
1.5.6.5




More information about the telepathy-commits mailing list