Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oscar.c @ 20778:8174f6999308
Sprinkle gc->wants_to_die = TRUE liberally around connection errors that really
ought to have been setting it already so that it is always set when a
disconnection reason is fatal. In a couple of other places, fix the reason to
be more accurate and not be fatal.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Fri, 05 Oct 2007 18:33:27 +0000 |
parents | f3cfcbbac3d8 |
children | efa448405f3d |
comparison
equal
deleted
inserted
replaced
20777:c40416c4eca6 | 20778:8174f6999308 |
---|---|
1257 | 1257 |
1258 if (!aim_snvalid(purple_account_get_username(account))) { | 1258 if (!aim_snvalid(purple_account_get_username(account))) { |
1259 gchar *buf; | 1259 gchar *buf; |
1260 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)); | 1260 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)); |
1261 gc->wants_to_die = TRUE; | 1261 gc->wants_to_die = TRUE; |
1262 purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, buf); | 1262 purple_connection_error_reason(gc, PURPLE_REASON_INVALID_SETTINGS, buf); |
1263 g_free(buf); | 1263 g_free(buf); |
1264 } | 1264 } |
1265 | 1265 |
1266 if (aim_snvalid_icq((purple_account_get_username(account)))) { | 1266 if (aim_snvalid_icq((purple_account_get_username(account)))) { |
1267 od->icq = TRUE; | 1267 od->icq = TRUE; |
1376 /* IP address connecting too frequently */ | 1376 /* IP address connecting too frequently */ |
1377 gc->wants_to_die = TRUE; | 1377 gc->wants_to_die = TRUE; |
1378 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.")); | 1378 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.")); |
1379 break; | 1379 break; |
1380 default: | 1380 default: |
1381 purple_connection_error_reason(gc, PURPLE_REASON_NETWORK_ERROR, _("Authentication failed")); | 1381 gc->wants_to_die = TRUE; |
1382 purple_connection_error_reason(gc, PURPLE_REASON_AUTHENTICATION_FAILED, _("Authentication failed")); | |
1382 break; | 1383 break; |
1383 } | 1384 } |
1384 purple_debug_info("oscar", "Login Error Code 0x%04hx\n", info->errorcode); | 1385 purple_debug_info("oscar", "Login Error Code 0x%04hx\n", info->errorcode); |
1385 purple_debug_info("oscar", "Error URL: %s\n", info->errorurl); | 1386 purple_debug_info("oscar", "Error URL: %s\n", info->errorurl); |
1386 return 1; | 1387 return 1; |