pidgin: 8351342d: Use PURPLE_CONNECTION_ERROR_NETWORK_ERRO...

nosnilmot at pidgin.im nosnilmot at pidgin.im
Sat Aug 1 12:05:26 EDT 2009


-----------------------------------------------------------------
Revision: 8351342d3a30c75649de9c3d4abc7b6f45ce8f82
Ancestor: ae0850eb3d14d75586cd0578668606b34c38fad1
Author: nosnilmot at pidgin.im
Date: 2009-08-01T15:59:40
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8351342d3a30c75649de9c3d4abc7b6f45ce8f82

Modified files:
        libpurple/protocols/yahoo/libymsg.c

ChangeLog: 

Use PURPLE_CONNECTION_ERROR_NETWORK_ERROR as the connection error
reason, which will allow libpurple's auto-reconnect to handle the
reconnection instead of forcing it in the prpl

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	f8b8f408beaae8c9798b182486c30370adc33468
+++ libpurple/protocols/yahoo/libymsg.c	94006e18d78b447a7fa7f0c9a1cb3eec9973437b
@@ -2035,7 +2035,6 @@ 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;
@@ -2086,8 +2085,8 @@ static void yahoo_process_authresp(Purpl
 	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"));
+		reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR;
 		break;
 	case 1013:
 		msg = g_strdup(_("Invalid username"));
@@ -2105,10 +2104,6 @@ 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