changeset 28899:9832ae3b94fd

merge of 'ac8595402f07bcd2e5467756aa6ccf6d9daf907a' and 'cea0a94190c6ddf69977976b807b9bc5aa880987'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 06 Nov 2009 21:28:04 +0000
parents 2302022ff8f1 (current diff) 546dcce6f780 (diff)
children 6126436715e8
files
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/clientlogin.c	Fri Nov 06 21:26:36 2009 +0000
+++ b/libpurple/protocols/oscar/clientlogin.c	Fri Nov 06 21:28:04 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 "