Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/auth_cyrus.c @ 30410:1e959e5cb237
jabber: Better error message when no concordant SASL mechs
This is much better than "Unknown Error". Closes #11924
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 20 May 2010 19:11:48 +0000 |
parents | 6c148063fdfd |
children | b78b5e7ffe82 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth_cyrus.c Thu May 20 18:57:09 2010 +0000 +++ b/libpurple/protocols/jabber/auth_cyrus.c Thu May 20 19:11:48 2010 +0000 @@ -399,6 +399,7 @@ xmlnode **reply, char **error) { xmlnode *mechnode; + JabberSaslState ret; js->sasl_mechs = g_string_new(""); @@ -418,7 +419,16 @@ } 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