# HG changeset patch # User Paul Aurich # Date 1257531121 0 # Node ID 546dcce6f780a71221745e7adf2fe560f92f8285 # Parent 682b441d4944b96020d9ad24b0d76c4c89415729 oscar: According to the online docs, statusCode 607 is rate limit (confirmed by my "tests" and Adium#13368c5. 401 is supposedly "Authorization required", but I've left in that anyway. http://dev.aol.com/aim/web/serverapi_reference#startOSCARSession diff -r 682b441d4944 -r 546dcce6f780 libpurple/protocols/oscar/clientlogin.c --- a/libpurple/protocols/oscar/clientlogin.c Fri Nov 06 09:57:49 2009 +0000 +++ b/libpurple/protocols/oscar/clientlogin.c Fri Nov 06 18:12:01 2009 +0000 @@ -109,6 +109,7 @@ xmlnode *host_node = NULL, *port_node = NULL, *cookie_node = NULL, *tls_node = NULL; gboolean use_tls; char *tmp; + guint code; use_tls = purple_account_get_bool(purple_connection_get_account(gc), "use_ssl", OSCAR_DEFAULT_USE_SSL); @@ -153,12 +154,13 @@ } /* Make sure the status code was 200 */ - if (strcmp(tmp, "200") != 0) + code = atoi(tmp); + if (code != 200) { purple_debug_error("oscar", "startOSCARSession response statusCode " "was %s: %s\n", tmp, response); - if (strcmp(tmp, "401") == 0) + if (code == 401 || code == 607) purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR, _("You have been connecting and disconnecting too "