Mercurial > pidgin
changeset 27782:931bb24c28ab
Fix #9660. Reconnect, in case of error 52.
author | Sulabh Mahajan <sulabh@soc.pidgin.im> |
---|---|
date | Sat, 01 Aug 2009 08:50:19 +0000 |
parents | ed11d1cabbe4 |
children | c499a1e8ceff |
files | libpurple/protocols/yahoo/libymsg.c |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c Sat Aug 01 07:45:23 2009 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sat Aug 01 08:50:19 2009 +0000 @@ -2035,6 +2035,7 @@ char *fullmsg; PurpleAccount *account = gc->account; PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_OTHER_ERROR; + gboolean reconnect = FALSE; while (l) { struct yahoo_pair *pair = l->data; @@ -2082,6 +2083,12 @@ msg = g_strdup(_("Your account is locked, please log in to the Yahoo! website.")); reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; break; + case 52: + /* See #9660. As much as we know, reconnecting shouldn't hurt */ + purple_debug_info("yahoo","Got error 52, Set to autoreconnect\n"); + reconnect = TRUE; + msg = g_strdup_printf(_("Unknown error number 52. Reconnecting...")); + break; case 1013: msg = g_strdup(_("Invalid username")); reason = PURPLE_CONNECTION_ERROR_INVALID_USERNAME; @@ -2098,6 +2105,10 @@ purple_connection_error_reason(gc, reason, fullmsg); g_free(msg); g_free(fullmsg); + + /* In case of error 52, we reconnect */ + if(reconnect) + purple_account_connect(account); } static void yahoo_process_addbuddy(PurpleConnection *gc, struct yahoo_packet *pkt)