changeset 30943:d760797a3528

Use Google mode also for video when on a Google connection and the receiver has the right caps. Only prefer Google Jingle over standard Jingle when we have received a Google relay token (I'm not sure if it could ever happen that there won't be one when on a Google connection, and we did the google:jingleinfo query...)
author Marcus Lundblad <ml@update.uu.se>
date Mon, 09 Nov 2009 19:27:38 +0000
parents e0796db1df8a
children 4b7d599b5a00
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Wed Sep 30 21:31:04 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Mon Nov 09 19:27:38 2009 +0000
@@ -3032,10 +3032,12 @@
 
 		/* if we are on a Google Talk connection and the remote supports
 		 Google Jingle, we will go with that */
-		if ((js->googletalk || 
+		if (((js->googletalk && js->google_relay_token) ||
 		     !jabber_resource_has_capability(jbr, JINGLE_APP_RTP_SUPPORT_AUDIO))
-		    && type & PURPLE_MEDIA_AUDIO && jabber_resource_has_capability(jbr,
-				GOOGLE_VOICE_CAP))
+		    && (((type & PURPLE_MEDIA_AUDIO) && 
+		    	jabber_resource_has_capability(jbr, GOOGLE_VOICE_CAP))
+		        || ((type & PURPLE_MEDIA_VIDEO) &&
+		    		jabber_resource_has_capability(jbr, GOOGLE_VIDEO_CAP))))
 			return jabber_google_session_initiate(js, who, type);
 		else
 			return jingle_rtp_initiate_media(js, who, type);