changeset 17437:8e20bb5640ed

Fix problems with MSN when you use a wrong password. The server helpfully includes this response in an HTTP header: "The e-mail address or password is incorrect. Do one of the following or try again:" But nothing in the header indicates what "the following" might be. So we just truncate that useless bit. Also set wants_to_die so we don't try reconnecting with a known bad password.
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 02 Jun 2007 14:57:17 +0000
parents ff04387682ce
children a4c1e66620e3
files libpurple/protocols/msn/nexus.c libpurple/protocols/msn/session.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/nexus.c	Sat Jun 02 14:26:43 2007 +0000
+++ b/libpurple/protocols/msn/nexus.c	Sat Jun 02 14:57:17 2007 +0000
@@ -247,6 +247,8 @@
 				temp = g_strndup(error, c - error);
 				error = purple_url_decode(temp);
 				g_free(temp);
+				if ((temp = strstr(error, " Do one of the following or try again:")) != NULL)
+					*temp = '\0';
 			}
 		}
 
--- a/libpurple/protocols/msn/session.c	Sat Jun 02 14:26:43 2007 +0000
+++ b/libpurple/protocols/msn/session.c	Sat Jun 02 14:57:17 2007 +0000
@@ -316,6 +316,7 @@
 							 "temporarily."));
 			break;
 		case MSN_ERROR_AUTH:
+			gc->wants_to_die = TRUE;
 			msg = g_strdup_printf(_("Unable to authenticate: %s"),
 								  (info == NULL ) ?
 								  _("Unknown error") : info);