im.pidgin.cpw.resiak.disconnectreason: ec09bfe3dac47b40b4b0d9a2efd1bb61422c8244

resiak at soc.pidgin.im resiak at soc.pidgin.im
Sun Nov 11 17:01:02 EST 2007


-----------------------------------------------------------------
Revision: ec09bfe3dac47b40b4b0d9a2efd1bb61422c8244
Ancestor: e88110f6c48eeae817b7242c1fb1b4e4246774da
Author: resiak at soc.pidgin.im
Date: 2007-11-11T21:41:59
Branch: im.pidgin.cpw.resiak.disconnectreason

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

ChangeLog: 

Use PURPLE_CONNECTION_ERROR_INVALID_USERNAME in oscar and yahoo, which were
the only places I could find where it could be used.

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	5ce25858e3e49cb83668730b259132cfcd272458
+++ libpurple/protocols/oscar/oscar.c	ad3a1ac26e88c2f13ad155aadbbd7cd0e3134e54
@@ -1344,7 +1344,7 @@ purple_parse_auth_resp(OscarData *od, Fl
 		switch (info->errorcode) {
 		case 0x01:
 			/* Unregistered screen name */
-			purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, _("Invalid screen name."));
+			purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_INVALID_USERNAME, _("Invalid screen name."));
 			break;
 		case 0x05:
 			/* Incorrect password */
============================================================
--- libpurple/protocols/yahoo/yahoo.c	737e0c99cddc286d859d8cad21d6096ca411fd55
+++ libpurple/protocols/yahoo/yahoo.c	a799a4e42c9e58ca39fa3124fdbc4b6f3dbf42e0
@@ -2090,6 +2090,7 @@ static void yahoo_process_authresp(Purpl
 	char *url = NULL;
 	char *fullmsg;
 	PurpleAccount *account = gc->account;
+	PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
 
 	while (l) {
 		struct yahoo_pair *pair = l->data;
@@ -2105,6 +2106,7 @@ static void yahoo_process_authresp(Purpl
 	switch (err) {
 	case 3:
 		msg = g_strdup(_("Invalid screen name."));
+		reason = PURPLE_CONNECTION_ERROR_INVALID_USERNAME;
 		break;
 	case 13:
 #ifdef TRY_WEBMESSENGER_LOGIN
@@ -2139,7 +2141,7 @@ static void yahoo_process_authresp(Purpl
 	else
 		fullmsg = g_strdup(msg);
 
-	purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, fullmsg);
+	purple_connection_error_reason(gc, reason, fullmsg);
 	g_free(msg);
 	g_free(fullmsg);
 }


More information about the Commits mailing list