Revision 2b313747a0b3a95319fb19451b6848937518b2ad

nwalp at pidgin.im nwalp at pidgin.im
Sat Mar 3 20:21:36 EST 2007


o   -----------------------------------------------------------------
|   Revision: 2b313747a0b3a95319fb19451b6848937518b2ad
|   Ancestor: f47b7cd12ff85fee26752fd5bfea7426003bdd67
|   Author: nwalp at pidgin.im
|   Date: 2007-03-03T19:18:38
|   Branch: im.pidgin.pidgin
|   
|   Modified files:
|           libpurple/protocols/jabber/auth.c
|           libpurple/protocols/jabber/jabber.c
|           libpurple/protocols/jabber/jabber.h
|   
|   ChangeLog: 
|   
|   pass the correct domain to cyrus sasl (sf patch 1663064)
|   
|   ============================================================
|   --- libpurple/protocols/jabber/auth.c	c25ad53febfcb660b78135e9962037b4dfe62773
|   +++ libpurple/protocols/jabber/auth.c	52eb43ed9d4ff4ee37df6c65d5a6665305b47f36
|   @@ -207,13 +207,8 @@ static void jabber_auth_start_cyrus(Jabb
|    
|    	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 @@ static void jabber_auth_start_cyrus(Jabb
|    				 * 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))) {
|   ============================================================
|   --- libpurple/protocols/jabber/jabber.c	967a7202a66fb3a58f0e02848c022f7105e8d126
|   +++ libpurple/protocols/jabber/jabber.c	3bdb8256299190ec37ca8607521883264a7e2473
|   @@ -504,6 +504,10 @@ static void jabber_login_connect(JabberS
|    
|    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 @@ static void jabber_close(GaimConnection 
|    		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);
|   ============================================================
|   --- libpurple/protocols/jabber/jabber.h	27165767ac8675ce20c8e4bb5f9376add8411010
|   +++ libpurple/protocols/jabber/jabber.h	9fd793f9a4b2102d06ed7f1e9c62307ad6ea4a46
|   @@ -123,7 +123,7 @@ typedef struct _JabberStream
|    	GSList *pending_avatar_requests;
|    
|    	GSList *pending_buddy_info_requests;
|   -		
|   +
|    	GaimCircBuffer *write_buffer;
|    	guint writeh;
|    
|   @@ -132,7 +132,7 @@ typedef struct _JabberStream
|    	JabberCapabilities server_caps;
|    	gboolean googletalk;
|    	char *server_name;
|   -  
|   +
|    	char *gmail_last_time;
|    	char *gmail_last_tid;
|    
|   @@ -145,6 +145,7 @@ typedef struct _JabberStream
|    	int sasl_state;
|    	int sasl_maxbuf;
|    	GString *sasl_mechs;
|   +	char *serverFQDN;
|    #endif
|    
|    } JabberStream;

To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 2b313747a0b3a95319fb19451b6848937518b2ad


More information about the Commits mailing list