pidgin: 008d1613: Fix #9660. Reconnect, in case of error 5...
sulabh at soc.pidgin.im
sulabh at soc.pidgin.im
Sat Aug 1 04:55:32 EDT 2009
-----------------------------------------------------------------
Revision: 008d1613ecc1640550482879aec436a33d3898d5
Ancestor: 55186ff177bde8f04b5bd54b2f0d1f6bdb4d36fb
Author: sulabh at soc.pidgin.im
Date: 2009-08-01T08:50:19
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/008d1613ecc1640550482879aec436a33d3898d5
Modified files:
libpurple/protocols/yahoo/libymsg.c
ChangeLog:
Fix #9660. Reconnect, in case of error 52.
-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c 4e51759d6a89c6570518295d7cf2307aeb1b6aca
+++ libpurple/protocols/yahoo/libymsg.c cc711b7c3f3275da2f49a7a04cc3bb6f8829e221
@@ -2035,6 +2035,7 @@ static void yahoo_process_authresp(Purpl
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 @@ static void yahoo_process_authresp(Purpl
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 @@ static void yahoo_process_authresp(Purpl
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)
More information about the Commits
mailing list