From: <fac...@us...> - 2007-03-03 19:25:35
|
Revision: 18197 http://svn.sourceforge.net/gaim/?rev=18197&view=rev Author: faceprint Date: 2007-03-03 11:25:26 -0800 (Sat, 03 Mar 2007) Log Message: ----------- sf patch 1663064 Modified Paths: -------------- trunk/libgaim/protocols/jabber/auth.c trunk/libgaim/protocols/jabber/jabber.c trunk/libgaim/protocols/jabber/jabber.h Modified: trunk/libgaim/protocols/jabber/auth.c =================================================================== --- trunk/libgaim/protocols/jabber/auth.c 2007-02-26 04:30:15 UTC (rev 18196) +++ trunk/libgaim/protocols/jabber/auth.c 2007-03-03 19:25:26 UTC (rev 18197) @@ -207,13 +207,7 @@ 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 +255,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))) { Modified: trunk/libgaim/protocols/jabber/jabber.c =================================================================== --- trunk/libgaim/protocols/jabber/jabber.c 2007-02-26 04:30:15 UTC (rev 18196) +++ trunk/libgaim/protocols/jabber/jabber.c 2007-03-03 19:25:26 UTC (rev 18197) @@ -499,6 +499,9 @@ 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")); @@ -1002,6 +1005,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); Modified: trunk/libgaim/protocols/jabber/jabber.h =================================================================== --- trunk/libgaim/protocols/jabber/jabber.h 2007-02-26 04:30:15 UTC (rev 18196) +++ trunk/libgaim/protocols/jabber/jabber.h 2007-03-03 19:25:26 UTC (rev 18197) @@ -145,6 +145,7 @@ int sasl_state; int sasl_maxbuf; GString *sasl_mechs; + char *serverFQDN; #endif } JabberStream; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |