--- a/libpurple/protocols/oscar/flap_connection.c Mon Oct 01 14:54:31 2007 +0000
+++ b/libpurple/protocols/oscar/flap_connection.c Mon Oct 01 16:07:14 2007 +0000
@@ -380,7 +380,10 @@
/* No more FLAP connections! Sign off this PurpleConnection! */
+ PurpleDisconnectReason reason = PURPLE_REASON_NETWORK_ERROR; if (conn->disconnect_code == 0x0001) {
+ reason = PURPLE_REASON_NAME_IN_USE; tmp = g_strdup(_("You have signed on from another location."));
od->gc->wants_to_die = TRUE;
} else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED)
@@ -402,7 +405,7 @@
- purple_connection_error(od->gc, tmp);
+ purple_connection_error_reason(od->gc, reason, tmp); --- a/libpurple/protocols/oscar/oscar.c Mon Oct 01 14:54:31 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c Mon Oct 01 16:07:14 2007 +0000
@@ -993,7 +993,7 @@
msg = g_strdup_printf(_("Could not connect to authentication server:\n%s"),
- purple_connection_error(gc, msg);
+ purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, msg); else if (conn->type == SNAC_FAMILY_LOCATE)
@@ -1001,7 +1001,7 @@
msg = g_strdup_printf(_("Could not connect to BOS server:\n%s"),
- purple_connection_error(gc, msg);
+ purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, msg); @@ -1257,7 +1257,7 @@
buf = g_strdup_printf(_("Unable to login: Could not sign on as %s because the screen name is invalid. Screen names must be a valid email address, or start with a letter and contain only letters, numbers and spaces, or contain only numbers."), purple_account_get_username(account));
- purple_connection_error(gc, buf);
+ purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, buf); @@ -1278,7 +1278,8 @@
connection_established_cb, newconn);
if (newconn->connect_data == NULL)
- purple_connection_error(gc, _("Couldn't connect to host"));
+ purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, + _("Couldn't connect to host")); @@ -1340,42 +1341,42 @@
/* Unregistered screen name */
- purple_connection_error(gc, _("Invalid screen name."));
+ purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Invalid screen name.")); if (!purple_account_get_remember_password(account))
purple_account_set_password(account, NULL);
- purple_connection_error(gc, _("Incorrect password."));
+ purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Incorrect password.")); - purple_connection_error(gc, _("Your account is currently suspended."));
+ purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Your account is currently suspended.")); /* service temporarily unavailable */
- purple_connection_error(gc, _("The AOL Instant Messenger service is temporarily unavailable."));
+ purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, _("The AOL Instant Messenger service is temporarily unavailable.")); /* screen name connecting too frequently */
- purple_connection_error(gc, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
+ purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.")); g_snprintf(buf, sizeof(buf), _("The client version you are using is too old. Please upgrade at %s"), PURPLE_WEBSITE);
- purple_connection_error(gc, buf);
+ purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, buf); /* IP address connecting too frequently */
- purple_connection_error(gc, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
+ purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.")); - purple_connection_error(gc, _("Authentication failed"));
+ purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, _("Authentication failed")); purple_debug_info("oscar", "Login Error Code 0x%04hx\n", info->errorcode);
@@ -1405,7 +1406,7 @@
if (newconn->connect_data == NULL)
- purple_connection_error(gc, _("Could Not Connect"));
+ purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, _("Could Not Connect")); @@ -1431,7 +1432,8 @@
- purple_connection_error(gc, _("The SecurID key entered is invalid."));
+ purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, + _("The SecurID key entered is invalid."));