soc.2008.masterpassword: d97bfe75: Remove the silly destroy argument from p...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Oct 31 04:10:50 EDT 2011
----------------------------------------------------------------------
Revision: d97bfe750e3ba1c8f52d14396f04b3ef7aa2cf69
Parent: 8aff600b3575e718460cbd6fcec1357c1a0544c3
Author: qulogic at pidgin.im
Date: 10/31/11 02:32:01
Branch: im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/d97bfe750e3ba1c8f52d14396f04b3ef7aa2cf69
Changelog:
Remove the silly destroy argument from purple_account_set_password and
purple_keyring_set_password. Make the password argument const. All
code paths would free the password immediately, anyway. Except maybe
the KWallet plugin, but that really appears totally broken, to be
honest.
Changes against parent 8aff600b3575e718460cbd6fcec1357c1a0544c3
patched finch/gntaccount.c
patched libpurple/account.c
patched libpurple/account.h
patched libpurple/example/nullclient.c
patched libpurple/keyring.c
patched libpurple/keyring.h
patched libpurple/plugins/keyrings/gnomekeyring.c
patched libpurple/plugins/keyrings/internalkeyring.c
patched libpurple/plugins/keyrings/kwallet.cpp
patched libpurple/plugins/one_time_password.c
patched libpurple/protocols/gg/gg.c
patched libpurple/protocols/jabber/auth.c
patched libpurple/protocols/jabber/auth_cyrus.c
patched libpurple/protocols/jabber/jabber.c
patched libpurple/protocols/msn/session.c
patched libpurple/protocols/mxit/actions.c
patched libpurple/protocols/mxit/login.c
patched libpurple/protocols/myspace/myspace.c
patched libpurple/protocols/novell/novell.c
patched libpurple/protocols/oscar/clientlogin.c
patched libpurple/protocols/oscar/flap_connection.c
patched libpurple/protocols/oscar/oscar.c
patched libpurple/protocols/silc/silc.c
patched libpurple/protocols/simple/simple.c
patched libpurple/protocols/yahoo/libymsg.c
patched libpurple/prpl.c
patched pidgin/gtkaccount.c
-------------- next part --------------
============================================================
--- libpurple/prpl.c 7227b9798f913079521ee9dd5f1f52e250e3acda
+++ libpurple/prpl.c e88fdd3d9c7b112d34d51cf1d7576fd24deb6ba1
@@ -361,7 +361,7 @@ do_prpl_change_account_status(PurpleAcco
if (!purple_account_get_remember_password(account)) {
PurpleConnection *gc = purple_account_get_connection(account);
if (gc && purple_connection_had_error(gc))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
}
if (!purple_account_is_disconnected(account))
============================================================
--- libpurple/protocols/jabber/jabber.c 90488a8cae9ce1368c744ba936ea7e85a60aa070
+++ libpurple/protocols/jabber/jabber.c 44ddc6aaf4ee504dc567e6d55aedb146124b5853
@@ -1264,7 +1264,7 @@ jabber_register_cb(JabberRegisterCBData
cbdata->js->user->node = g_strdup(value);
}
if(cbdata->js->registration && !strcmp(id, "password"))
- purple_account_set_password(purple_connection_get_account(cbdata->js->gc), value, NULL, NULL, NULL);
+ purple_account_set_password(purple_connection_get_account(cbdata->js->gc), value, NULL, NULL);
}
}
}
@@ -2488,7 +2488,7 @@ jabber_password_change_result_cb(JabberS
purple_notify_info(js->gc, _("Password Changed"), _("Password Changed"),
_("Your password has been changed."));
- purple_account_set_password(purple_connection_get_account(js->gc), (char *)data, NULL, NULL, NULL);
+ purple_account_set_password(purple_connection_get_account(js->gc), (const char *)data, NULL, NULL);
} else {
char *msg = jabber_parse_error(js, packet, NULL);
@@ -2744,7 +2744,7 @@ char *jabber_parse_error(JabberStream *j
SET_REASON(PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED);
/* Clear the pasword if it isn't being saved */
if (!purple_account_get_remember_password(purple_connection_get_account(js->gc)))
- purple_account_set_password(purple_connection_get_account(js->gc), NULL, NULL, NULL, NULL);
+ purple_account_set_password(purple_connection_get_account(js->gc), NULL, NULL, NULL);
text = _("Not Authorized");
} else if(xmlnode_get_child(packet, "temporary-auth-failure")) {
text = _("Temporary Authentication Failure");
============================================================
--- libpurple/protocols/oscar/oscar.c 948dcfb8c93b09820078b1fac2c93c3b487748d9
+++ libpurple/protocols/oscar/oscar.c 248233078d3c4e1f1d8ee752e53407af62dfcd34
@@ -1095,7 +1095,7 @@ purple_parse_auth_resp(OscarData *od, Fl
case 0x05:
/* Incorrect password */
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
purple_connection_error(gc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, _("Incorrect password"));
break;
case 0x11:
============================================================
--- libpurple/protocols/gg/gg.c d8146e71887d89f863cf2ce9fe419f0a6396669d
+++ libpurple/protocols/gg/gg.c 2bdc02f5b57f23196dfaa93e812247fc0612fad4
@@ -386,7 +386,7 @@ static void ggp_callback_register_accoun
t = g_strdup_printf("%u", uin);
purple_account_set_username(account, t);
/* Save the password if remembering passwords for the account */
- purple_account_set_password(account, p1, NULL, NULL, NULL);
+ purple_account_set_password(account, p1, NULL, NULL);
purple_notify_info(NULL, _("New Gadu-Gadu Account Registered"),
_("Registration completed successfully!"), NULL);
@@ -651,7 +651,7 @@ static void ggp_callback_change_passwd_h
if (req->http_req->data != NULL &&
((struct gg_pubdir*)req->http_req->data)->success == 1)
{
- purple_account_set_password(req->account, req->new_password, NULL, NULL, NULL);
+ purple_account_set_password(req->account, req->new_password, NULL, NULL);
purple_notify_info(req->account, messagesTitle,
_("Password was changed successfully!"), NULL);
goto exit_cleanup;
============================================================
--- libpurple/protocols/yahoo/libymsg.c 3dacf0342505d556df616c08fc85720ce52dde20
+++ libpurple/protocols/yahoo/libymsg.c 2a7d89a8ca1bde47fadd08bfe6170550f804794f
@@ -158,7 +158,7 @@ static void yahoo_process_status(PurpleC
if (pkt->service == YAHOO_SERVICE_LOGOFF && pkt->status == -1) {
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
purple_connection_error(gc, PURPLE_CONNECTION_ERROR_NAME_IN_USE,
_("You have signed on from another location"));
return;
@@ -1959,7 +1959,7 @@ static void yahoo_auth16_stage1_cb(Purpl
/* Password incorrect */
/* Set password to NULL. Avoids account locking. Brings dialog to enter password if clicked on Re-enable account */
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
error_reason = g_strdup(_("Incorrect password"));
error = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
break;
@@ -2256,7 +2256,7 @@ static void yahoo_process_authresp(Purpl
}
#endif /* TRY_WEBMESSENGER_LOGIN */
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
msg = g_strdup(_("Invalid username or password"));
reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
============================================================
--- libpurple/protocols/msn/session.c c9573707140eafe2699e21289fa35223431b59c5
+++ libpurple/protocols/msn/session.c f2d9bbe2d38b8a844c8da69915c3fc061e90a8e1
@@ -384,7 +384,7 @@ msn_session_set_error(MsnSession *sessio
reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE;
msg = g_strdup(_("You have signed on from another location"));
if (!purple_account_get_remember_password(session->account))
- purple_account_set_password(session->account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(session->account, NULL, NULL, NULL);
break;
case MSN_ERROR_SERV_UNAVAILABLE:
reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR;
@@ -404,7 +404,7 @@ msn_session_set_error(MsnSession *sessio
_("Unknown error") : info);
/* Clear the password if it isn't being saved */
if (!purple_account_get_remember_password(session->account))
- purple_account_set_password(session->account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(session->account, NULL, NULL, NULL);
break;
case MSN_ERROR_BAD_BLIST:
reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR;
============================================================
--- libpurple/account.c 7cea897395ca0545ebcc1907f24ad4087e736afc
+++ libpurple/account.c a0981e2377f56fbd3fd254c8d6c9834f7842df0f
@@ -1249,12 +1249,12 @@ request_password_ok_cb(PurpleAccount *ac
}
if (!remember)
- purple_keyring_set_password(account, NULL, NULL, NULL, NULL);
+ purple_keyring_set_password(account, NULL, NULL, NULL);
purple_account_set_remember_password(account, remember);
password = g_strdup(entry);
- purple_account_set_password(account, password, NULL, NULL, NULL);
+ purple_account_set_password(account, password, NULL, NULL);
g_free(password);
_purple_connection_new(account, FALSE, entry);
@@ -1738,8 +1738,7 @@ purple_account_set_password(PurpleAccoun
void
purple_account_set_password(PurpleAccount *account,
- gchar *password,
- GDestroyNotify destroy,
+ const gchar *password,
PurpleKeyringSaveCallback cb,
gpointer data)
{
@@ -1766,8 +1765,7 @@ purple_account_set_password(PurpleAccoun
cb(account, NULL, data);
} else {
- purple_keyring_set_password(account, password,
- destroy, cb, data);
+ purple_keyring_set_password(account, password, cb, data);
}
}
@@ -2848,7 +2846,7 @@ purple_account_change_password(PurpleAcc
PurpleConnection *gc = purple_account_get_connection(account);
PurplePlugin *prpl = NULL;
- purple_account_set_password(account, g_strdup(new_pw), g_free, NULL, NULL);
+ purple_account_set_password(account, new_pw, NULL, NULL);
if (gc != NULL)
prpl = purple_connection_get_prpl(gc);
@@ -3072,7 +3070,7 @@ purple_accounts_delete(PurpleAccount *ac
/* this is async because we do not want the
* account overwritten before we are done.
*/
- purple_keyring_set_password(account, NULL, NULL,
+ purple_keyring_set_password(account, NULL,
purple_accounts_delete_finish, NULL);
}
============================================================
--- libpurple/account.h 5378226812971a30fba84d45d49fabe42470254c
+++ libpurple/account.h 866ee720dab2f4575e3a7588f3f5556d0bd87f23
@@ -354,13 +354,11 @@ void purple_account_set_username(PurpleA
*
* @param account The account for which the password is to be saved.
* @param password The password to save.
- * @param destroy A function called to free the password. Can be NULL.
* @param cb A callback for once the password is saved.
* @param data A pointer to be passed to the callback.
*/
void purple_account_set_password(PurpleAccount *account,
- gchar *password,
- GDestroyNotify destroy,
+ const gchar *password,
PurpleKeyringSaveCallback cb,
gpointer data);
============================================================
--- pidgin/gtkaccount.c 1352c88a4dd37a5cb97b2682a7675df71ed2baf7
+++ pidgin/gtkaccount.c 370d7294c6b13b0d562b4ccc33c964cb45e78646
@@ -1374,7 +1374,7 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
/* Remember Password */
remember = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->remember_pass_check));
if(!remember)
- purple_keyring_set_password(account, NULL, NULL, NULL, NULL);
+ purple_keyring_set_password(account, NULL, NULL, NULL);
purple_account_set_remember_password(account, remember);
@@ -1395,9 +1395,9 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
* don't want to prompt them.
*/
if ((purple_account_get_remember_password(account) || new_acct) && (*value != '\0')) {
- purple_account_set_password(account, value, NULL, NULL, NULL);
+ purple_account_set_password(account, value, NULL, NULL);
} else {
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
}
purple_account_set_username(account, username);
============================================================
--- libpurple/protocols/jabber/auth.c e2f4c1c7c4aea0fb15e5f61c20b2808f7a6901d1
+++ libpurple/protocols/jabber/auth.c 8e56252d8c86715fd89ec51b2937ecd68543458b
@@ -110,7 +110,7 @@ auth_old_pass_cb(PurpleConnection *gc, P
if (remember)
purple_account_set_remember_password(account, TRUE);
- purple_account_set_password(account, entry, NULL, NULL, NULL);
+ purple_account_set_password(account, entry, NULL, NULL);
/* Restart our connection */
jabber_auth_start_old(js);
@@ -228,7 +228,7 @@ static void auth_old_result_cb(JabberStr
reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
/* Clear the pasword if it isn't being saved */
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
}
purple_connection_error(js->gc, reason, msg);
============================================================
--- libpurple/protocols/novell/novell.c 692aab78d595ef7edb6f46f3fcf87adbb86b6686
+++ libpurple/protocols/novell/novell.c 8f797aec941057305987b0a0857a311819a6cb73
@@ -132,7 +132,7 @@ _login_resp_cb(NMUser * user, NMERR_T re
* password was invalid.
*/
if (!purple_account_get_remember_password(purple_connection_get_account(gc)))
- purple_account_set_password(purple_connection_get_account(gc), NULL, NULL, NULL, NULL);
+ purple_account_set_password(purple_connection_get_account(gc), NULL, NULL, NULL);
reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
break;
default:
@@ -2036,7 +2036,7 @@ _evt_user_disconnect(NMUser * user, NMEv
if (gc)
{
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
purple_connection_error(gc,
PURPLE_CONNECTION_ERROR_NAME_IN_USE,
_("You have signed on from another location"));
============================================================
--- libpurple/protocols/silc/silc.c 8c294a40f7da18a4b09d98520ad9e0c8c55d5bde
+++ libpurple/protocols/silc/silc.c c5954983c0e9e73e2d07e74d202eb6e70e52aebb
@@ -481,7 +481,7 @@ static void silcpurple_got_password_cb(P
if (remember)
purple_account_set_remember_password(account, TRUE);
- purple_account_set_password(account, password, NULL, NULL, NULL);
+ purple_account_set_password(account, password, NULL, NULL);
/* Load SILC key pair */
g_snprintf(pkd, sizeof(pkd), "%s" G_DIR_SEPARATOR_S "public_key.pub", silcpurple_silcdir());
============================================================
--- libpurple/protocols/simple/simple.c ab8137d06fa86ae5baf5d35434f9b352ba2ebb40
+++ libpurple/protocols/simple/simple.c af63f6b7bf21ac88d4096d8cb4f4adb6237ec9d3
@@ -1122,7 +1122,7 @@ gboolean process_register_response(struc
purple_debug_info("simple", "REGISTER retries %d\n", sip->registrar.retries);
if(sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) {
if (!purple_account_get_remember_password(purple_connection_get_account(sip->gc)))
- purple_account_set_password(purple_connection_get_account(sip->gc), NULL, NULL, NULL, NULL);
+ purple_account_set_password(purple_connection_get_account(sip->gc), NULL, NULL, NULL);
purple_connection_error(sip->gc,
PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED,
_("Incorrect password"));
============================================================
--- libpurple/protocols/oscar/flap_connection.c f1b327e0232802d0d462071efd85647cb072ba97
+++ libpurple/protocols/oscar/flap_connection.c 521d6793547471b2c7211cf64628ace455a142b7
@@ -468,7 +468,7 @@ flap_connection_destroy_cb(gpointer data
reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE;
tmp = g_strdup(_("You have signed on from another location"));
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
} else if (conn->disconnect_reason == OSCAR_DISCONNECT_REMOTE_CLOSED)
tmp = g_strdup(_("Server closed the connection"));
else if (conn->disconnect_reason == OSCAR_DISCONNECT_LOST_CONNECTION)
============================================================
--- finch/gntaccount.c db31cb6ba490433b56af291e87467c499c8c876f
+++ finch/gntaccount.c ae0ec6e9f0d507720aeab6dde35922e4b0ae495d
@@ -199,9 +199,9 @@ save_account_cb(AccountEditDialog *dialo
gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->remember)));
value = gnt_entry_get_text(GNT_ENTRY(dialog->password));
if (value && *value)
- purple_account_set_password(account, g_strdup(value), g_free, NULL, NULL);
+ purple_account_set_password(account, value, NULL, NULL);
else
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
/* Mail notification */
purple_account_set_check_mail(account,
============================================================
--- libpurple/example/nullclient.c 2218a88e486f5880b6d35a695425d5941619983d
+++ libpurple/example/nullclient.c 727ae6c7e8462c0abd46f912cfca5ca79d4ac05b
@@ -305,7 +305,7 @@ int main(int argc, char *argv[])
/* Get the password for the account */
password = getpass("Password: ");
- purple_account_set_password(account, g_strdup(password), g_free, NULL, NULL);
+ purple_account_set_password(account, password, NULL, NULL);
/* It's necessary to enable the account first. */
purple_account_set_enabled(account, UI_ID, TRUE);
============================================================
--- libpurple/protocols/myspace/myspace.c 8f259473fd909c851860799381c49f4304ee9f04
+++ libpurple/protocols/myspace/myspace.c 336d212b983a217ee79d4721cad59744cbb6e95c
@@ -1836,7 +1836,7 @@ msim_error(MsimSession *session, MsimMes
case MSIM_ERROR_INCORRECT_PASSWORD: /* Incorrect password */
reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
if (!purple_account_get_remember_password(session->account))
- purple_account_set_password(session->account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(session->account, NULL, NULL, NULL);
#ifdef MSIM_MAX_PASSWORD_LENGTH
if (purple_connection_get_password(session->gc) && (strlen(purple_connection_get_password(session->gc)) > MSIM_MAX_PASSWORD_LENGTH)) {
gchar *suggestion;
@@ -1861,7 +1861,7 @@ msim_error(MsimSession *session, MsimMes
case MSIM_ERROR_LOGGED_IN_ELSEWHERE: /* Logged in elsewhere */
reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE;
if (!purple_account_get_remember_password(session->account))
- purple_account_set_password(session->account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(session->account, NULL, NULL, NULL);
break;
}
purple_connection_error(session->gc, reason, full_errmsg);
============================================================
--- libpurple/keyring.h c3a987482396d698dd34dad8461c9940e92abaa9
+++ libpurple/keyring.h 03b048e2b40c946d6ebd370a079838faaff2e3d1
@@ -131,13 +131,11 @@ typedef void (*PurpleKeyringRead)(Purple
* the function returns, so one must take care to make a copy if they call other
* async functions later. If the password is NULL, this means that the keyring
* should forget about that password.
- * @param destroypassword A function that will be called to free the password.
* @param cb A callback to be called once the password is saved.
* @param data A pointer to be passed to the callback
*/
typedef void (*PurpleKeyringSave)(PurpleAccount * account,
- gchar * password,
- GDestroyNotify destroypassword,
+ const gchar * password,
PurpleKeyringSaveCallback cb,
gpointer data);
@@ -326,14 +324,12 @@ purple_keyring_get_password(PurpleAccoun
*
* @param account The account for which the password is to be saved.
* @param password The password to save.
- * @param destroy A function called to free the password. Can be NULL.
* @param cb A callback for once the password is saved.
* @param data A pointer to be passed to the callback.
*/
void
purple_keyring_set_password(PurpleAccount *account,
- gchar *password,
- GDestroyNotify destroy,
+ const gchar *password,
PurpleKeyringSaveCallback cb,
gpointer data);
============================================================
--- libpurple/keyring.c 4618bf09319f12f67f5a91008c04710daf8db6ba
+++ libpurple/keyring.c fdd49d06e77050675e3b6a926e79e8905068036c
@@ -359,7 +359,7 @@ purple_keyring_drop_passwords(const Purp
for (cur = purple_accounts_get_all();
cur != NULL;
cur = cur->next)
- save(cur->data, NULL, NULL, NULL, NULL);
+ save(cur->data, NULL, NULL, NULL);
return;
}
@@ -467,7 +467,7 @@ purple_keyring_set_inuse_check_error_cb(
* schedule_accounts_save() function, but other such functions
* are not exposed. So these was done for consistency.
*/
- purple_account_set_password(NULL, NULL, NULL, NULL, NULL);
+ purple_account_set_password(NULL, NULL, NULL, NULL);
return;
}
@@ -513,7 +513,7 @@ purple_keyring_set_inuse_got_pw_cb(Purpl
* in having a keyring that can't store passwords, but it
* will prevent crash with invalid keyrings
*/
- save(account, password, NULL,
+ save(account, password,
purple_keyring_set_inuse_check_error_cb, tracker);
} else {
@@ -919,8 +919,7 @@ purple_keyring_set_password(PurpleAccoun
void
purple_keyring_set_password(PurpleAccount * account,
- gchar *password,
- GDestroyNotify destroy,
+ const gchar *password,
PurpleKeyringSaveCallback cb,
gpointer data)
{
@@ -952,8 +951,7 @@ purple_keyring_set_password(PurpleAccoun
cbinfo = g_malloc(sizeof(PurpleKeyringCbInfo));
cbinfo->cb = cb;
cbinfo->data = data;
- save(account, password, destroy,
- purple_keyring_set_password_async_cb, data);
+ save(account, password, purple_keyring_set_password_async_cb, data);
}
}
return;
============================================================
--- libpurple/plugins/keyrings/gnomekeyring.c 532b8dafd7590a343b59a1ae070fb4272c96c7d2
+++ libpurple/plugins/keyrings/gnomekeyring.c b86f5b119a339f921a50c1d2cc59e1db2ac030a6
@@ -80,7 +80,7 @@ static void gkp_read_continue(GnomeKeyr
static GQuark gkp_error_domain(void);
static void gkp_read(PurpleAccount *, PurpleKeyringReadCallback, gpointer);
static void gkp_read_continue(GnomeKeyringResult, const char *, gpointer);
-static void gkp_save(PurpleAccount *, gchar *, GDestroyNotify, PurpleKeyringSaveCallback, gpointer);
+static void gkp_save(PurpleAccount *, const gchar *, PurpleKeyringSaveCallback, gpointer);
static void gkp_save_continue(GnomeKeyringResult, gpointer);
static void gkp_close(GError **);
static gboolean gkp_import_password(PurpleAccount *, const char *, const char *, GError **);
@@ -180,8 +180,7 @@ gkp_save(PurpleAccount * account,
static void
gkp_save(PurpleAccount * account,
- gchar * password,
- GDestroyNotify destroy,
+ const gchar * password,
PurpleKeyringSaveCallback cb,
gpointer data)
{
@@ -210,9 +209,6 @@ gkp_save(PurpleAccount * account,
"user", purple_account_get_username(account),
"protocol", purple_account_get_protocol_id(account),
NULL);
-
- if (destroy)
- destroy(password);
} else { /* password == NULL, delete password. */
============================================================
--- libpurple/plugins/keyrings/internalkeyring.c a40b49d8f39c60d307739e4b6d2ccd9625062881
+++ libpurple/plugins/keyrings/internalkeyring.c af26ab59f6131cc2816c17420d64cd95efc2118f
@@ -74,7 +74,7 @@ static void internal_keyring_read(Purp
/* a few prototypes : */
static void internal_keyring_read(PurpleAccount *, PurpleKeyringReadCallback, gpointer);
-static void internal_keyring_save(PurpleAccount *, gchar *, GDestroyNotify, PurpleKeyringSaveCallback, gpointer);
+static void internal_keyring_save(PurpleAccount *, const gchar *, PurpleKeyringSaveCallback, gpointer);
static void internal_keyring_close(GError **);
static void internal_keyring_open(void);
static gboolean internal_keyring_import_password(PurpleAccount *, const char *, const char *, GError **);
@@ -120,8 +120,7 @@ internal_keyring_save(PurpleAccount * ac
static void
internal_keyring_save(PurpleAccount * account,
- gchar * password,
- GDestroyNotify destroy,
+ const gchar * password,
PurpleKeyringSaveCallback cb,
gpointer data)
{
@@ -145,9 +144,6 @@ internal_keyring_save(PurpleAccount * ac
}
- if(destroy && password)
- destroy(password);
-
if (cb != NULL)
cb(account, NULL, data);
return;
============================================================
--- libpurple/plugins/keyrings/kwallet.cpp 0790b29d9eed817e00c99d66c4b4aaa93d2dcf21
+++ libpurple/plugins/keyrings/kwallet.cpp 7423a9acfaff35a071e30e91d17d5f403dd0a2eb
@@ -331,15 +331,12 @@ kwallet_save(PurpleAccount * account,
void
kwallet_save(PurpleAccount * account,
- char * password,
- GDestroyNotify destroypassword,
+ const char * password,
PurpleKeyringSaveCallback cb,
gpointer data)
{
KWalletPlugin::read_request req(account, password, cb, data);
KWalletPlugin::engine::instance()->queue(req);
- if (destroypassword)
- destroypassword(password);
}
============================================================
--- libpurple/plugins/one_time_password.c 1c1366daa9b160a8ce8897969141cc14eb05726a
+++ libpurple/plugins/one_time_password.c f60abb92bd5d89e51bbd76394abb5ebc7aba39df
@@ -46,7 +46,7 @@ signed_on_cb(PurpleConnection *conn, voi
purple_account_get_username(account),
purple_account_get_protocol_name(account));
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
/* TODO: Do we need to somehow clear conn->password ? */
}
}
============================================================
--- libpurple/protocols/oscar/clientlogin.c b09a25144fddd328e8df35800ca30b89638eb37e
+++ libpurple/protocols/oscar/clientlogin.c b0fa0781e65567e2770f7bf266dee6a0037605ee
@@ -481,7 +481,7 @@ static gboolean parse_client_login_respo
if (status_code == 330 && status_detail_code == 3011) {
PurpleAccount *account = purple_connection_get_account(gc);
if (!purple_account_get_remember_password(account))
- purple_account_set_password(account, NULL, NULL, NULL, NULL);
+ purple_account_set_password(account, NULL, NULL, NULL);
purple_connection_error(gc,
PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED,
_("Incorrect password"));
============================================================
--- libpurple/protocols/jabber/auth_cyrus.c cf46c9930b24df660546af79a3152a9ad84f532f
+++ libpurple/protocols/jabber/auth_cyrus.c fe95dddd0d1cf68a13229c93456be9c51e03a5c3
@@ -154,7 +154,7 @@ static void auth_pass_cb(PurpleConnectio
if (remember)
purple_account_set_remember_password(account, TRUE);
- purple_account_set_password(account, entry, NULL, NULL, NULL);
+ purple_account_set_password(account, entry, NULL, NULL);
/* Rebuild our callbacks as we now have a password to offer */
jabber_sasl_build_callbacks(js);
============================================================
--- libpurple/protocols/mxit/actions.c e8540358fff4167d0d67f06c5869913b9487d5bd
+++ libpurple/protocols/mxit/actions.c 9bfada37bda70028f09fdb83f585bb90ca2703ce
@@ -335,7 +335,7 @@ out:
out:
if ( !err ) {
/* update PIN in account */
- purple_account_set_password( session->acc, pin, NULL, NULL, NULL );
+ purple_account_set_password( session->acc, pin, NULL, NULL );
/* update session object */
g_free( session->encpwd );
============================================================
--- libpurple/protocols/mxit/login.c 9346e1d4d9421bd076179d04f4a34e3a82147bcc
+++ libpurple/protocols/mxit/login.c a24fc6c6c8263faf8b5c0c8538541ed7e751aca9
@@ -284,7 +284,7 @@ out:
out:
if ( !err ) {
- purple_account_set_password( session->acc, session->profile->pin, NULL, NULL, NULL );
+ purple_account_set_password( session->acc, session->profile->pin, NULL, NULL );
mxit_login_connect( session );
}
else {
More information about the Commits
mailing list