# HG changeset patch # User Sulabh Mahajan # Date 1249116619 0 # Node ID 36526c9eb31df27724a0381dcce0d96095094d59 # Parent 378df616b02999a19390905bf90a05e7bedeb9b1 Fix #9660. Reconnect, in case of error 52. diff -r 378df616b029 -r 36526c9eb31d 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)