Mercurial > pidgin
changeset 20590:a2cb2a2fe424
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.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 21 Sep 2007 03:24:29 +0000 |
parents | 5723dbc6212d |
children | 06d09b778992 |
files | libpurple/protocols/myspace/myspace.c |
diffstat | 1 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c Fri Sep 21 02:46:27 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Fri Sep 21 03:24:29 2007 +0000 @@ -1784,14 +1784,13 @@ /* 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; - if (!purple_account_get_remember_password(session->account)) - purple_account_set_password(session->account, NULL); - } if (err == 6) { - /* Logged in elsewhere */ - session->gc->wants_to_die = TRUE; + switch (err) { + case 260: /* Incorrect password */ + case 6: /* Logged in elsewhere */ + session->gc->wants_to_die = TRUE; + if (!purple_account_get_remember_password(session->account)) + purple_account_set_password(session->account, NULL); + break; } purple_connection_error(session->gc, full_errmsg); } else {