cpw.malu.xmpp.google_relay: b04f4322: Use Google mode also for video when on a...

malu at pidgin.im malu at pidgin.im
Mon Nov 9 14:32:20 EST 2009


-----------------------------------------------------------------
Revision: b04f4322926ab2a4467fb2b9c11d9961e66d1a9c
Ancestor: 3dd0f0753787ede0cf7fd3266d03b324cf869053
Author: malu at pidgin.im
Date: 2009-11-09T19:27:38
Branch: im.pidgin.cpw.malu.xmpp.google_relay
URL: http://d.pidgin.im/viewmtn/revision/info/b04f4322926ab2a4467fb2b9c11d9961e66d1a9c

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

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...) 

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	f638a3ff365ff67e1784debc1e53600e01b37354
+++ libpurple/protocols/jabber/jabber.c	52d7c0d774edf8377fd698042b67aab4a302ab29
@@ -3032,10 +3032,12 @@ jabber_initiate_media(PurpleAccount *acc
 
 		/* 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);


More information about the Commits mailing list