diff options
author | Elliott Sales de Andrade <qulogic@pidgin.im> | 2014-11-12 02:21:47 -0500 |
---|---|---|
committer | Elliott Sales de Andrade <qulogic@pidgin.im> | 2014-11-12 02:21:47 -0500 |
commit | 98401755c599a0a04c39ef3b38ad3041dd317837 (patch) | |
tree | a63e7eea04099f746c91bc041613ff32c524bbc3 | |
parent | b79fbf4a6100cc6cdb5f857bd652c32734ffea90 (diff) | |
download | pidgin-98401755c599a0a04c39ef3b38ad3041dd317837.tar.gz |
msn: Hard fail if buddy list is unavailable.
Previously, this would blindly continue to attempt to connect, and
that's a lot of extra load as in the recent case of the ApplicationId
being disabled on the MSN servers.
-rw-r--r-- | libpurple/protocols/msn/contact.c | 16 | ||||
-rw-r--r-- | libpurple/protocols/msn/session.c | 6 |
2 files changed, 12 insertions, 10 deletions
diff --git a/libpurple/protocols/msn/contact.c b/libpurple/protocols/msn/contact.c index 46f7feb8cf..5d8fd08cef 100644 --- a/libpurple/protocols/msn/contact.c +++ b/libpurple/protocols/msn/contact.c @@ -487,12 +487,6 @@ msn_parse_contact_list(MsnSession *session, xmlnode *node) * this is not handled yet */ if ((fault = xmlnode_get_child(node, "Body/Fault"))) { - if ((faultnode = xmlnode_get_child(fault, "faultstring"))) { - char *faultstring = xmlnode_get_data(faultnode); - purple_debug_info("msn", "Retrieving contact list failed: %s\n", - faultstring); - g_free(faultstring); - } if ((faultnode = xmlnode_get_child(fault, "detail/errorcode"))) { char *errorcode = xmlnode_get_data(faultnode); @@ -505,7 +499,15 @@ msn_parse_contact_list(MsnSession *session, xmlnode *node) g_free(errorcode); } - msn_get_contact_list(session, MSN_PS_INITIAL, NULL); + if ((faultnode = xmlnode_get_child(fault, "faultstring"))) { + char *faultstring = xmlnode_get_data(faultnode); + purple_debug_info("msn", "Retrieving contact list failed: %s\n", + faultstring); + msn_session_set_error(session, MSN_ERROR_BAD_BLIST, faultstring); + g_free(faultstring); + } else { + msn_session_set_error(session, MSN_ERROR_BAD_BLIST, NULL); + } return FALSE; } else { xmlnode *service; diff --git a/libpurple/protocols/msn/session.c b/libpurple/protocols/msn/session.c index 1775c0acf1..114bc17650 100644 --- a/libpurple/protocols/msn/session.c +++ b/libpurple/protocols/msn/session.c @@ -408,9 +408,9 @@ msn_session_set_error(MsnSession *session, MsnErrorType error, break; case MSN_ERROR_BAD_BLIST: reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; - msg = g_strdup(_("Your MSN buddy list is temporarily " - "unavailable. Please wait and try " - "again.")); + msg = g_strdup_printf(_("Your MSN buddy list is temporarily " + "unavailable: %s"), + (info == NULL) ? _("Unknorn error") : info); break; default: reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |