# HG changeset patch # User Sulabh Mahajan # Date 1249116619 0 # Node ID 931bb24c28abac2769751d8022976b8dd0213e22 # Parent ed11d1cabbe4b024308a6f2ddc1b56ae7bc5fb2d Fix #9660. Reconnect, in case of error 52. diff -r ed11d1cabbe4 -r 931bb24c28ab libpurple/protocols/yahoo/libymsg.c --- 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)