diff src/account.c @ 11985:41d84ac57cb6

[gaim-migrate @ 14278] Getting some stuff out of my tree committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 05 Nov 2005 21:49:44 +0000
parents 54a3eae03182
children e4666705944b
line wrap: on
line diff
--- a/src/account.c	Sat Nov 05 20:45:35 2005 +0000
+++ b/src/account.c	Sat Nov 05 21:49:44 2005 +0000
@@ -878,11 +878,11 @@
 			gaim_conversation_set_account(conv, NULL);
 	}
 
-	if (account->username    != NULL) g_free(account->username);
-	if (account->alias       != NULL) g_free(account->alias);
-	if (account->password    != NULL) g_free(account->password);
-	if (account->user_info   != NULL) g_free(account->user_info);
-	if (account->protocol_id != NULL) g_free(account->protocol_id);
+	g_free(account->username);
+	g_free(account->alias);
+	g_free(account->password);
+	g_free(account->user_info);
+	g_free(account->protocol_id);
 
 	g_hash_table_destroy(account->settings);
 	g_hash_table_destroy(account->ui_settings);
@@ -914,10 +914,10 @@
 {
 	const char *entry;
 	gboolean remember;
-	
+
 	entry = gaim_request_fields_get_string(fields, "password");
 	remember = gaim_request_fields_get_bool(fields, "remember");
-	
+
 	if (!entry || !*entry)
 	{
 		gaim_notify_error(account, NULL, _("Password is required to sign on."), NULL);
@@ -1071,7 +1071,6 @@
 	}
 
 	gaim_account_change_password(account, orig_pass, new_pass_1);
-	gaim_account_set_password(account, new_pass_1);
 }
 
 void
@@ -2033,12 +2032,14 @@
 	GaimPluginProtocolInfo *prpl_info = NULL;
 	GaimConnection *gc = gaim_account_get_connection(account);
 
+	gaim_account_set_password(account, new_pw);
+
 	if (gc != NULL && gc->prpl != NULL)
 		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
 
 	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->change_passwd)
 		prpl_info->change_passwd(gc, orig_pw, new_pw);
-}	
+}
 
 void
 gaim_accounts_add(GaimAccount *account)