libpurple/protocols/jabber/jabber.c

branch
cpw.malu.xmpp.google_relay
changeset 28598
54f315145943
parent 28597
0e06c97202e9
child 28845
e13e49289770
--- 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);

mercurial