changeset 15766:2d739b7a14ac

merge of '2b313747a0b3a95319fb19451b6848937518b2ad' and '77fb229680f0342a6684d001bebbd722f3f4d194'
author Nathan Walp <nwalp@pidgin.im>
date Sat, 03 Mar 2007 19:18:47 +0000
parents 51dd9ae01585 (diff) d318c6672011 (current diff)
children ed29bd084eb5 c6ad254c1b89
files gaim-installer.nsi pidgin/pixmaps/gaim-install.ico pidgin/win32/nsis/gaim-header.bmp pidgin/win32/nsis/gaim-intro.bmp pidgin/win32/nsis/gaim-plugin.nsh
diffstat 3 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Sat Mar 03 04:06:19 2007 +0000
+++ b/libpurple/protocols/jabber/auth.c	Sat Mar 03 19:18:47 2007 +0000
@@ -207,13 +207,8 @@
 
 	do {
 		again = FALSE;
-		/* Use the user's domain for compatibility with the old
-		 * DIGESTMD5 code. Note that this may cause problems where
-		 * the user's domain doesn't match the FQDN of the jabber
-		 * service
-		 */
 
-		js->sasl_state = sasl_client_new("xmpp", js->user->domain, NULL, NULL, js->sasl_cb, 0, &js->sasl);
+		js->sasl_state = sasl_client_new("xmpp", js->serverFQDN, NULL, NULL, js->sasl_cb, 0, &js->sasl);
 		if (js->sasl_state==SASL_OK) {
 			sasl_setprop(js->sasl, SASL_SEC_PROPS, &secprops);
 			gaim_debug_info("sasl", "Mechs found: %s\n", js->sasl_mechs->str);
@@ -261,6 +256,12 @@
 				 * Presumably, if we get here that isn't the case and we shouldn't try again?
 				 * I suspect that this never happens.
 				 */
+				/*
+				 * SXW: Yes, this is right. What this handles is the situation where a
+				 * mechanism, say GSSAPI, is tried. If that mechanism fails, it may be
+				 * due to mechanism specific issues, so we want to try one of the other
+				 * supported mechanisms. This code handles that case
+				 */
 				if (mech && strlen(mech) > 0) {
 					char *pos;
 					if ((pos = strstr(js->sasl_mechs->str, mech))) {
--- a/libpurple/protocols/jabber/jabber.c	Sat Mar 03 04:06:19 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sat Mar 03 19:18:47 2007 +0000
@@ -504,6 +504,10 @@
 
 static void jabber_login_connect(JabberStream *js, const char *server, int port)
 {
+#ifdef HAVE_CYRUS_SASL
+	js->serverFQDN = g_strdup(server);
+#endif
+
 	if (gaim_proxy_connect(js->gc, js->gc->account, server,
 			port, jabber_login_callback, js->gc) == NULL)
 		gaim_connection_error(js->gc, _("Unable to create socket"));
@@ -1007,6 +1011,8 @@
 		g_string_free(js->sasl_mechs, TRUE);
 	if(js->sasl_cb)
 		g_free(js->sasl_cb);
+	if(js->serverFQDN)
+		g_free(js->serverFQDN);
 #endif
 	g_free(js->server_name);
 	g_free(js->gmail_last_time);
--- a/libpurple/protocols/jabber/jabber.h	Sat Mar 03 04:06:19 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Sat Mar 03 19:18:47 2007 +0000
@@ -123,7 +123,7 @@
 	GSList *pending_avatar_requests;
 
 	GSList *pending_buddy_info_requests;
-		
+
 	GaimCircBuffer *write_buffer;
 	guint writeh;
 
@@ -132,7 +132,7 @@
 	JabberCapabilities server_caps;
 	gboolean googletalk;
 	char *server_name;
-  
+
 	char *gmail_last_time;
 	char *gmail_last_tid;
 
@@ -145,6 +145,7 @@
 	int sasl_state;
 	int sasl_maxbuf;
 	GString *sasl_mechs;
+	char *serverFQDN;
 #endif
 
 } JabberStream;