diff libpurple/protocols/jabber/auth_plain.c @ 30909:25e200cb3532

propagate from branch 'im.pidgin.pidgin' (head dca20e09164518b0f7a773edd7e9649f41d8873d) to branch 'im.pidgin.cpw.malu.xmpp.google_refactor' (head 7823c556f2d1bbca43f5ef9f0fea30cabc5d313f)
author Marcus Lundblad <ml@update.uu.se>
date Tue, 31 Aug 2010 18:28:10 +0000
parents a97ddee04b78
children 3f5ff1ea4802
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth_plain.c	Fri Apr 09 22:14:51 2010 +0000
+++ b/libpurple/protocols/jabber/auth_plain.c	Tue Aug 31 18:28:10 2010 +0000
@@ -40,13 +40,16 @@
 	auth = xmlnode_new("auth");
 	xmlnode_set_namespace(auth, NS_XMPP_SASL);
 
-	xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
-	xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+	if (g_str_equal(js->user->domain, "gmail.com") ||
+			g_str_equal(js->user->domain, "googlemail.com")) {
+		xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
+		xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+	}
 
 	response = g_string_new("");
-	response = g_string_append_len(response, "\0", 1);
+	response = g_string_append_c(response, '\0');
 	response = g_string_append(response, js->user->node);
-	response = g_string_append_len(response, "\0", 1);
+	response = g_string_append_c(response, '\0');
 	response = g_string_append(response,
 			purple_connection_get_password(js->gc));