# HG changeset patch # User Will Thompson # Date 1193237338 0 # Node ID b4833db5eed072757481d68141d7dccc0f62ae20 # Parent 68098b461e00e0397d7c7905b536e40fd340890b Having read the XMPP SASL specification, these errors seem more accurate. diff -r 68098b461e00 -r b4833db5eed0 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Wed Oct 24 14:20:16 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.c Wed Oct 24 14:48:58 2007 +0000 @@ -1900,27 +1900,28 @@ } } 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") ||