pidgin: b547c524: jabber: Better error message when no con...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Thu May 20 15:15:57 EDT 2010
-----------------------------------------------------------------
Revision: b547c5243a5b1930a85a528096a3cf2a2263ac29
Ancestor: b0945d6684083e9d0c34b24441d8a306ce9ffef1
Author: darkrain42 at pidgin.im
Date: 2010-05-20T19:11:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b547c5243a5b1930a85a528096a3cf2a2263ac29
Modified files:
libpurple/protocols/jabber/auth_cyrus.c
ChangeLog:
jabber: Better error message when no concordant SASL mechs
This is much better than "Unknown Error". Closes #11924
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth_cyrus.c db5593ef92afbf77e1350255877f28fbb88cdbff
+++ libpurple/protocols/jabber/auth_cyrus.c 02b56b1cb1a3d9a302a72749eead75e0e6bbc75a
@@ -399,6 +399,7 @@ jabber_cyrus_start(JabberStream *js, xml
xmlnode **reply, char **error)
{
xmlnode *mechnode;
+ JabberSaslState ret;
js->sasl_mechs = g_string_new("");
@@ -418,7 +419,16 @@ jabber_cyrus_start(JabberStream *js, xml
}
jabber_sasl_build_callbacks(js);
- return jabber_auth_start_cyrus(js, reply, error);
+ ret = jabber_auth_start_cyrus(js, reply, error);
+
+ /*
+ * Triggered if no overlap between server and client
+ * supported mechanisms.
+ */
+ if (ret == JABBER_SASL_STATE_FAIL && *error == NULL)
+ *error = g_strdup(_("No authentication mechanisms in common with server"));
+
+ return ret;
}
static JabberSaslState
More information about the Commits
mailing list