changeset 25001:2a1873a30474

Fix receiving voice calls from Gmail.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Wed, 07 Jan 2009 02:46:41 +0000
parents 2cf44cc855fe
children 9a43944fff35
files libpurple/protocols/jabber/google.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Wed Jan 07 02:30:46 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Wed Jan 07 02:46:41 2009 +0000
@@ -187,11 +187,18 @@
 		xmlnode_set_attrib(candidate, "port", port);
 		xmlnode_set_attrib(candidate, "name", "rtp");
 		xmlnode_set_attrib(candidate, "username", transport->username);
-		xmlnode_set_attrib(candidate, "password", transport->password);
+		/*
+		 * As of this writing, Farsight 2 in Google compatibility
+		 * mode doesn't provide a password. The Gmail client
+		 * requires this to be set.
+		 */
+		xmlnode_set_attrib(candidate, "password",
+				transport->password != NULL ?
+				transport->password : "");
 		xmlnode_set_attrib(candidate, "preference", pref);
 		xmlnode_set_attrib(candidate, "protocol", transport->proto == FS_NETWORK_PROTOCOL_UDP ? "udp" : "tcp");
 		xmlnode_set_attrib(candidate, "type", transport->type == FS_CANDIDATE_TYPE_HOST ? "local" :
-						      transport->type == FS_CANDIDATE_TYPE_PRFLX ? "stun" :
+						      transport->type == FS_CANDIDATE_TYPE_SRFLX ? "stun" :
 					       	      transport->type == FS_CANDIDATE_TYPE_RELAY ? "relay" : NULL);
 		xmlnode_set_attrib(candidate, "generation", "0");
 		xmlnode_set_attrib(candidate, "network", "0");