changeset 30944:4b7d599b5a00

merge of '745f55ef98eaf96a452eb54bb2c46f21845f9996' and 'b04f4322926ab2a4467fb2b9c11d9961e66d1a9c'
author Marcus Lundblad <ml@update.uu.se>
date Mon, 09 Nov 2009 19:27:45 +0000
parents 0712ce23901e (current diff) d760797a3528 (diff)
children 0b5520bf1fe3
files libpurple/protocols/jabber/JEPS libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Mon Nov 09 19:01:03 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Mon Nov 09 19:27:45 2009 +0000
@@ -3028,10 +3028,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);