im.pidgin.cpw.resiak.disconnectreason: 41f03fff0ed32c5ff61956bb612f3e23412ac305

resiak at soc.pidgin.im resiak at soc.pidgin.im
Sat Oct 27 13:51:00 EDT 2007


-----------------------------------------------------------------
Revision: 41f03fff0ed32c5ff61956bb612f3e23412ac305
Ancestor: 91baee232d50ee2ba5a20e3ab2146dc8c38055c9
Author: resiak at soc.pidgin.im
Date: 2007-10-24T14:48:58
Branch: im.pidgin.cpw.resiak.disconnectreason

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

Having read the XMPP SASL specification, these errors seem more accurate.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	d25c021320e472d00fde5a0dff143bd336cc0332
+++ libpurple/protocols/jabber/jabber.c	81ae12ce12663cf6ca22431f1065824f693770ff
@@ -1900,27 +1900,28 @@ char *jabber_parse_error(JabberStream *j
 		}
 	} else if(xmlns && !strcmp(xmlns, "urn:ietf:params:xml:ns:xmpp-sasl")) {
 		/* Most common reason can be the default */
-		SET_REASON(PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED);
+		SET_REASON(PURPLE_CONNECTION_ERROR_NETWORK_ERROR);
 		if(xmlnode_get_child(packet, "aborted")) {
 			text = _("Authorization Aborted");
 		} else if(xmlnode_get_child(packet, "incorrect-encoding")) {
-			SET_REASON(PURPLE_CONNECTION_ERROR_NETWORK_ERROR);
 			text = _("Incorrect encoding in authorization");
 		} else if(xmlnode_get_child(packet, "invalid-authzid")) {
 			text = _("Invalid authzid");
 		} else if(xmlnode_get_child(packet, "invalid-mechanism")) {
 			text = _("Invalid Authorization Mechanism");
 		} else if(xmlnode_get_child(packet, "mechanism-too-weak")) {
+			SET_REASON(PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE);
 			text = _("Authorization mechanism too weak");
 		} else if(xmlnode_get_child(packet, "not-authorized")) {
+			SET_REASON(PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED);
 			/* Clear the pasword if it isn't being saved */
 			if (!purple_account_get_remember_password(js->gc->account))
 				purple_account_set_password(js->gc->account, NULL);
 			text = _("Not Authorized");
 		} else if(xmlnode_get_child(packet, "temporary-auth-failure")) {
-			SET_REASON(PURPLE_CONNECTION_ERROR_NETWORK_ERROR);
 			text = _("Temporary Authentication Failure");
 		} else {
+			SET_REASON(PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED);
 			text = _("Authentication Failure");
 		}
 	} else if(!strcmp(packet->name, "stream:error") ||


More information about the Commits mailing list