Mercurial > pidgin.yaz
changeset 15770:c6ad254c1b89
merge of '12db4a9e09675b5127f1f310972303177d1b2ca8'
and '5cf92d48f9a1b8faa3631c7aae938072ee695efd'
author | Richard Nelson <wabz@pidgin.im> |
---|---|
date | Sun, 04 Mar 2007 07:54:43 +0000 |
parents | 0869f00ca178 (current diff) 2d739b7a14ac (diff) |
children | 2ed235b0f97e |
files | |
diffstat | 3 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c Sat Mar 03 23:12:11 2007 +0000 +++ b/libpurple/protocols/jabber/auth.c Sun Mar 04 07:54:43 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 23:12:11 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sun Mar 04 07:54:43 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 23:12:11 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.h Sun Mar 04 07:54:43 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;