soc.2008.masterpassword: 32e87edd: Changed purple_account_set_password to t...

scrouaf at soc.pidgin.im scrouaf at soc.pidgin.im
Wed Aug 27 06:05:57 EDT 2008


-----------------------------------------------------------------
Revision: 32e87edd043cecbf6811ef1778632e11f115e946
Ancestor: 39a8bd23bfee874e5da4dbfe576e3ac25c133941
Author: scrouaf at soc.pidgin.im
Date: 2008-08-27T09:33:03
Branch: im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/32e87edd043cecbf6811ef1778632e11f115e946

Modified files:
        libpurple/account.c libpurple/account.h

ChangeLog: 

Changed purple_account_set_password to take a const char * password again.

-------------- next part --------------
============================================================
--- libpurple/account.c	adc2cb1829e70a01c8f307db80b547280b65ae81
+++ libpurple/account.c	073b528efa4d6a188e8ae0d11ffecd686f47f145
@@ -1605,19 +1605,18 @@ void
 }
 
 void
-purple_account_set_password(PurpleAccount *account, char *password)
+purple_account_set_password(PurpleAccount *account, const char *password)
 {
 	schedule_accounts_save();
 
 	g_return_if_fail(account != NULL);
 
-	if (account->password != NULL)
-		g_free(account->password);
+	g_free(account->password);
 
 	account->password = g_strdup(password);
 
 	if (purple_account_get_remember_password(account) == TRUE)
-		purple_keyring_set_password_async(account, password, NULL, NULL, NULL);
+		purple_keyring_set_password_async(account, account->password, NULL, NULL, NULL);
 }
 
 void 
============================================================
--- libpurple/account.h	085ec64844db2c06663d15219e556863f05db3bf
+++ libpurple/account.h	89d76a25fe92a1a716bf952595f388517c2dfe40
@@ -328,7 +328,7 @@ void purple_account_set_username(PurpleA
  * @param account  The account.
  * @param password The password.
  */
-void purple_account_set_password(PurpleAccount *account, char *password);
+void purple_account_set_password(PurpleAccount *account, const char *password);
 
 /**
  * Set a password to be remembered.


More information about the Commits mailing list