changeset 19636:e6548df6262e

Three small changes: 1. Set wants_to_die for MySpace accounts when you used the incorrect password. This tells libpurple not to try to reconnect. 2. Don't display the purple_notify_error() if we call purple_connection_error(), because that causes the same message to be displayed to the user in two different places 3. Free full_errmsg when we're done with it
author Mark Doliner <mark@kingant.net>
date Tue, 04 Sep 2007 06:04:36 +0000
parents 0b8740878f9e
children 5ee8869b5130
files libpurple/protocols/myspace/myspace.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Tue Sep 04 05:44:21 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Tue Sep 04 06:04:36 2007 +0000
@@ -1775,15 +1775,20 @@
 	purple_debug_info("msim", "msim_error (sesskey=%d): %s\n", 
 			session->sesskey, full_errmsg);
 
-	purple_notify_error(session->account, g_strdup(_("MySpaceIM Error")), 
-			full_errmsg, NULL);
-
 	/* Destroy session if fatal. */
 	if (msim_msg_get(msg, "fatal")) {
 		purple_debug_info("msim", "fatal error, closing\n");
+		if (err == 260)
+			/* Incorrect password */
+			session->gc->wants_to_die = TRUE;
 		purple_connection_error(session->gc, full_errmsg);
+	} else {
+		purple_notify_error(session->account, g_strdup(_("MySpaceIM Error")), 
+				full_errmsg, NULL);
 	}
 
+	g_free(full_errmsg);
+
 	return TRUE;
 }