diff libpurple/protocols/jabber/auth.c @ 23077:9d331ad0a8dc

Skip the X-GOOGLE-TOKEN mech (given us by Google Talk when connecting with SASL support), as we don't support it and its presence in the mechs list makes us think we have another fallback left if we fail PLAIN, which can distort the presented error message.
author Evan Schoenberg <evan.s@dreskin.net>
date Wed, 21 May 2008 01:49:03 +0000
parents 42dfa1139b5c
children 0ae9c9befa63
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Wed May 21 01:46:01 2008 +0000
+++ b/libpurple/protocols/jabber/auth.c	Wed May 21 01:49:03 2008 +0000
@@ -499,6 +499,13 @@
 	{
 		char *mech_name = xmlnode_get_data(mechnode);
 #ifdef HAVE_CYRUS_SASL
+		/* Don't include Google Talk's X-GOOGLE-TOKEN mechanism, as we will not
+		 * support it and including it gives a false fall-back to other mechs offerred,
+		 * leading to incorrect error handling.
+		 */
+		if (mech_name && !strcmp(mech_name, "X-GOOGLE-TOKEN"))
+			continue;
+
 		g_string_append(js->sasl_mechs, mech_name);
 		g_string_append_c(js->sasl_mechs, ' ');
 #else