diff libpurple/protocols/simple/simple.c @ 20589:5723dbc6212d

Clear the password consistently when we get a "Signed-On elsewhere" or a "Invalid Password" disconnection. Disconnection reason codes will take care of this in the core, but until then, this is ok. Fixes #3204.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 21 Sep 2007 02:46:27 +0000
parents 6e93a79b2ae5
children f3cfcbbac3d8 b8e8b7dba8e0
line wrap: on
line diff
--- a/libpurple/protocols/simple/simple.c	Fri Sep 21 01:49:27 2007 +0000
+++ b/libpurple/protocols/simple/simple.c	Fri Sep 21 02:46:27 2007 +0000
@@ -695,7 +695,7 @@
 static void do_register_exp(struct simple_account_data *sip, int expire) {
 	char *uri, *to, *contact, *hdr;
 
-	/* Set our default expiration to 900, 
+	/* Set our default expiration to 900,
 	 * as done in the initialization of the simple_account_data
 	 * structure.
 	 */
@@ -1042,6 +1042,8 @@
 				if(sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) {
 					purple_debug_info("simple", "Setting wants_to_die to true.\n");
 					sip->gc->wants_to_die = TRUE;
+					if (!purple_account_get_remember_password(sip->gc->account))
+						purple_account_set_password(sip->gc->account, NULL);
 					purple_connection_error(sip->gc, _("Incorrect password."));
 					return TRUE;
 				}