Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
20588:e23a1585d822 | 20589:5723dbc6212d |
---|---|
693 } | 693 } |
694 | 694 |
695 static void do_register_exp(struct simple_account_data *sip, int expire) { | 695 static void do_register_exp(struct simple_account_data *sip, int expire) { |
696 char *uri, *to, *contact, *hdr; | 696 char *uri, *to, *contact, *hdr; |
697 | 697 |
698 /* Set our default expiration to 900, | 698 /* Set our default expiration to 900, |
699 * as done in the initialization of the simple_account_data | 699 * as done in the initialization of the simple_account_data |
700 * structure. | 700 * structure. |
701 */ | 701 */ |
702 if (!expire) | 702 if (!expire) |
703 expire = 900; | 703 expire = 900; |
1040 if(sip->registerstatus != SIMPLE_REGISTER_RETRY) { | 1040 if(sip->registerstatus != SIMPLE_REGISTER_RETRY) { |
1041 purple_debug_info("simple", "REGISTER retries %d\n", sip->registrar.retries); | 1041 purple_debug_info("simple", "REGISTER retries %d\n", sip->registrar.retries); |
1042 if(sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) { | 1042 if(sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) { |
1043 purple_debug_info("simple", "Setting wants_to_die to true.\n"); | 1043 purple_debug_info("simple", "Setting wants_to_die to true.\n"); |
1044 sip->gc->wants_to_die = TRUE; | 1044 sip->gc->wants_to_die = TRUE; |
1045 if (!purple_account_get_remember_password(sip->gc->account)) | |
1046 purple_account_set_password(sip->gc->account, NULL); | |
1045 purple_connection_error(sip->gc, _("Incorrect password.")); | 1047 purple_connection_error(sip->gc, _("Incorrect password.")); |
1046 return TRUE; | 1048 return TRUE; |
1047 } | 1049 } |
1048 tmp = sipmsg_find_header(msg, "WWW-Authenticate"); | 1050 tmp = sipmsg_find_header(msg, "WWW-Authenticate"); |
1049 fill_auth(sip, tmp, &sip->registrar); | 1051 fill_auth(sip, tmp, &sip->registrar); |