soc.2008.masterpassword: 5a65a687: Make stuff consistent.
qulogic at pidgin.im
qulogic at pidgin.im
Mon Nov 7 02:37:37 EST 2011
----------------------------------------------------------------------
Revision: 5a65a687841ee193a58f4b537b8a4af944fa7d41
Parent: 5f3def4cdd54981255b8e59a9f9c3b3978465581
Author: qulogic at pidgin.im
Date: 11/05/11 23:28:27
Branch: im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/5a65a687841ee193a58f4b537b8a4af944fa7d41
Changelog:
Make stuff consistent.
Changes against parent 5f3def4cdd54981255b8e59a9f9c3b3978465581
patched libpurple/keyring.c
patched libpurple/plugins/keyrings/gnomekeyring.c
patched libpurple/plugins/keyrings/internalkeyring.c
-------------- next part --------------
============================================================
--- libpurple/keyring.c 3291abe379f8fdcc9e129c9f95dfc720214ae634
+++ libpurple/keyring.c d74cfe5bf5edd683ef9b85ebbd977c819d41e983
@@ -371,26 +371,26 @@ purple_keyring_set_inuse_check_error_cb(
switch(error->code) {
case PURPLE_KEYRING_ERROR_NOCAP:
purple_debug_info("keyring",
- "Keyring could not save password for account %s : %s\n",
+ "Keyring could not save password for account %s : %s.\n",
name, error->message);
break;
case PURPLE_KEYRING_ERROR_NOPASSWD:
purple_debug_info("keyring",
- "No password found while changing keyring for account %s : %s\n",
+ "No password found while changing keyring for account %s : %s.\n",
name, error->message);
break;
case PURPLE_KEYRING_ERROR_NOCHANNEL:
purple_debug_info("keyring",
- "Failed to communicate with backend while changing keyring for account %s : %s Aborting changes.\n",
+ "Failed to communicate with backend while changing keyring for account %s : %s. Aborting changes.\n",
name, error->message);
tracker->abort = TRUE;
break;
default:
purple_debug_info("keyring",
- "Unknown error while changing keyring for account %s : %s\n",
+ "Unknown error while changing keyring for account %s : %s.\n",
name, error->message);
break;
}
@@ -409,7 +409,7 @@ purple_keyring_set_inuse_check_error_cb(
close(NULL);
purple_debug_info("keyring",
- "Failed to change keyring, aborting");
+ "Failed to change keyring, aborting.\n");
purple_notify_error(NULL, _("Keyrings"), _("Failed to change the keyring."),
_("Aborting changes."));
@@ -427,8 +427,7 @@ purple_keyring_set_inuse_check_error_cb(
purple_keyring_drop_passwords(tracker->old);
- purple_debug_info("keyring",
- "Successfully changed keyring.\n");
+ purple_debug_info("keyring", "Successfully changed keyring.\n");
if (tracker->cb != NULL)
tracker->cb(tracker->new, TRUE, error, tracker->data);
@@ -523,7 +522,7 @@ purple_keyring_set_inuse(const PurpleKey
error = g_error_new(PURPLE_KEYRING_ERROR, PURPLE_KEYRING_ERROR_NOCAP,
"Existing keyring cannot read passwords");
*/
- purple_debug_info("keyring", "Existing keyring cannot read passwords");
+ purple_debug_info("keyring", "Existing keyring cannot read passwords.\n");
/* at this point, we know the keyring won't let us
* read passwords, so there no point in copying them.
@@ -591,8 +590,6 @@ purple_keyring_get_options(void)
keyring = keyrings->data;
list = g_list_append(list, keyring->name);
list = g_list_append(list, keyring->id);
- purple_debug_info("keyring", "adding pair : %s, %s.\n",
- keyring->name, keyring->id);
}
return list;
@@ -611,7 +608,7 @@ purple_keyring_register(PurpleKeyring *k
/* keyring with no ID. Add error handling ? */
g_return_if_fail(keyring_id != NULL);
- purple_debug_info("keyring", "Registering keyring : %s\n",
+ purple_debug_info("keyring", "Registering keyring : %s.\n",
keyring->id);
/* If this is the configured keyring, use it. */
@@ -627,7 +624,7 @@ purple_keyring_register(PurpleKeyring *k
core = purple_get_core();
purple_signal_emit(core, "keyring-register", keyring_id, keyring);
- purple_debug_info("keyring", "registered keyring : %s.\n", keyring_id);
+ purple_debug_info("keyring", "Registered keyring : %s.\n", keyring_id);
purple_keyring_keyrings = g_list_prepend(purple_keyring_keyrings,
keyring);
@@ -643,7 +640,7 @@ purple_keyring_unregister(PurpleKeyring
g_return_if_fail(keyring != NULL);
- purple_debug_info("keyring", "Unregistering keyring %s",
+ purple_debug_info("keyring", "Unregistering keyring %s.\n",
purple_keyring_get_id(keyring));
core = purple_get_core();
@@ -666,7 +663,7 @@ purple_keyring_unregister(PurpleKeyring
purple_keyring_keyrings = g_list_remove(purple_keyring_keyrings,
keyring);
- purple_debug_info("keyring", "Keyring %s unregistered", keyring->id);
+ purple_debug_info("keyring", "Keyring %s unregistered.\n", keyring->id);
}
/*@}*/
@@ -725,7 +722,7 @@ purple_keyring_import_password(PurpleAcc
if (import == NULL) {
*error = g_error_new(PURPLE_KEYRING_ERROR, PURPLE_KEYRING_ERROR_NOCAP,
"Keyring cannot import password info.");
- purple_debug_info("Keyring", "Configured keyring cannot import password info. This might be normal.");
+ purple_debug_info("Keyring", "Configured keyring cannot import password info. This might be normal.\n");
return FALSE;
}
@@ -749,7 +746,7 @@ purple_keyring_export_password(PurpleAcc
*error = g_error_new(PURPLE_KEYRING_ERROR, PURPLE_KEYRING_ERROR_NOKEYRING,
"No keyring configured, cannot export password info");
purple_debug_info("keyring",
- "No keyring configured, cannot export password info");
+ "No keyring configured, cannot export password info.\n");
return FALSE;
}
@@ -765,7 +762,7 @@ purple_keyring_export_password(PurpleAcc
*error = g_error_new(PURPLE_KEYRING_ERROR, PURPLE_KEYRING_ERROR_INVALID,
"Plugin does not have a keyring id");
purple_debug_info("keyring",
- "Configured keyring does not have a keyring id, cannot export password");
+ "Configured keyring does not have a keyring id, cannot export password.\n");
return FALSE;
}
@@ -775,7 +772,7 @@ purple_keyring_export_password(PurpleAcc
*error = g_error_new(PURPLE_KEYRING_ERROR, PURPLE_KEYRING_ERROR_NOCAP,
"Keyring cannot export password info.");
purple_debug_info("keyring",
- "Keyring cannot export password info. This might be normal");
+ "Keyring cannot export password info. This might be normal.\n");
return FALSE;
}
============================================================
--- libpurple/plugins/keyrings/gnomekeyring.c 72501d7cb67ce48d84651ac30abc76ce2e8266c1
+++ libpurple/plugins/keyrings/gnomekeyring.c 368c1df9d4ebc4be9ab54ee2a8457a13e26dcb2d
@@ -48,9 +48,9 @@
#include "plugin.h"
#include "internal.h"
-#define GNOMEKEYRING_NAME N_("Gnome-Keyring")
+#define GNOMEKEYRING_NAME N_("GNOME-Keyring")
#define GNOMEKEYRING_VERSION "0.3b"
-#define GNOMEKEYRING_DESCRIPTION N_("This plugin will store passwords in Gnome-Keyring.")
+#define GNOMEKEYRING_DESCRIPTION N_("This plugin will store passwords in GNOME Keyring.")
#define GNOMEKEYRING_AUTHOR "Scrouaf (scrouaf[at]soc.pidgin.im)"
#define GNOMEKEYRING_ID "core-scrouaf-gnomekeyring"
@@ -104,7 +104,7 @@ gkp_read_continue(GnomeKeyringResult res
case GNOME_KEYRING_RESULT_IO_ERROR:
error = g_error_new(ERR_GNOMEKEYRINGPLUGIN,
PURPLE_KEYRING_ERROR_NOCHANNEL,
- "Failed to communicate with gnome keyring (account : %s).",
+ "Failed to communicate with GNOME Keyring (account : %s).",
purple_account_get_username(account));
if(cb != NULL)
cb(account, NULL, error, storage->user_data);
@@ -166,7 +166,7 @@ gkp_save_continue(GnomeKeyringResult res
if (result != GNOME_KEYRING_RESULT_OK) {
switch(result) {
case GNOME_KEYRING_RESULT_NO_MATCH:
- purple_debug_info("Gnome keyring plugin",
+ purple_debug_info("keyring-gnome",
"Could not update password for %s (%s) : not found.\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
@@ -181,13 +181,13 @@ gkp_save_continue(GnomeKeyringResult res
case GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON:
case GNOME_KEYRING_RESULT_IO_ERROR:
- purple_debug_info("Gnome keyring plugin",
- "Failed to communicate with gnome keyring (account : %s (%s)).\n",
+ purple_debug_info("keyring-gnome",
+ "Failed to communicate with GNOME Keyring (account : %s (%s)).\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
error = g_error_new(ERR_GNOMEKEYRINGPLUGIN,
PURPLE_KEYRING_ERROR_NOCHANNEL,
- "Failed to communicate with gnome keyring (account : %s).",
+ "Failed to communicate with GNOME Keyring (account : %s).",
purple_account_get_username(account));
if(cb != NULL)
cb(account, error, storage->user_data);
@@ -195,7 +195,7 @@ gkp_save_continue(GnomeKeyringResult res
return;
default:
- purple_debug_info("Gnome keyring plugin",
+ purple_debug_info("keyring-gnome",
"Unknown error (account : %s (%s)).\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
@@ -210,7 +210,7 @@ gkp_save_continue(GnomeKeyringResult res
}
} else {
- purple_debug_info("gnome-keyring-plugin", "password for %s updated.\n",
+ purple_debug_info("keyring-gnome", "Password for %s updated.\n",
purple_account_get_username(account));
if (cb != NULL)
@@ -233,7 +233,7 @@ gkp_save(PurpleAccount *account,
purple_account_get_username(account));
if (password != NULL && *password != '\0') {
- purple_debug_info("Gnome keyring plugin",
+ purple_debug_info("keyring-gnome",
"Updating password for account %s (%s).\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
@@ -250,7 +250,7 @@ gkp_save(PurpleAccount *account,
NULL);
} else { /* password == NULL, delete password. */
- purple_debug_info("Gnome keyring plugin",
+ purple_debug_info("keyring-gnome",
"Forgetting password for account %s (%s).\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
@@ -275,7 +275,7 @@ gkp_import_password(PurpleAccount *accou
const char *data,
GError **error)
{
- purple_debug_info("Gnome Keyring plugin", "Importing password.\n");
+ purple_debug_info("keyring-gnome", "Importing password.\n");
return TRUE;
}
@@ -286,7 +286,7 @@ gkp_export_password(PurpleAccount *accou
GError **error,
GDestroyNotify *destroy)
{
- purple_debug_info("Gnome Keyring plugin", "Exporting password.\n");
+ purple_debug_info("keyring-gnome", "Exporting password.\n");
*data = NULL;
*mode = NULL;
*destroy = NULL;
@@ -298,10 +298,10 @@ gkp_change_master(PurpleKeyringChangeMas
static void
gkp_change_master(PurpleKeyringChangeMasterCallback cb, gpointer data)
{
- purple_debug_info("Gnome-Keyring plugin",
+ purple_debug_info("keyring-gnome",
"This keyring does not support master passwords.\n");
- purple_notify_info(NULL, _("Gnome-Keyring plugin"),
+ purple_notify_info(NULL, _("GNOME Keyring plugin"),
_("Failed to change master password."),
_("This plugin does not really support master passwords, it just pretends to."));
if (cb)
@@ -311,7 +311,7 @@ gkp_init(void)
static gboolean
gkp_init(void)
{
- purple_debug_info("gnome-keyring-plugin", "init.\n");
+ purple_debug_info("keyring-gnome", "Init.\n");
if (gnome_keyring_is_available()) {
keyring_handler = purple_keyring_new();
@@ -330,8 +330,8 @@ gkp_init(void)
return TRUE;
} else {
- purple_debug_info("gnome-keyring-plugin",
- "failed to communicate with daemon, not loading.");
+ purple_debug_info("keyring-gnome",
+ "Failed to communicate with daemon, not loading.\n");
return FALSE;
}
}
@@ -339,7 +339,7 @@ gkp_uninit(void)
static void
gkp_uninit(void)
{
- purple_debug_info("gnome-keyring-plugin", "uninit.\n");
+ purple_debug_info("keyring-gnome", "Uninit.\n");
gkp_close(NULL);
purple_keyring_unregister(keyring_handler);
purple_keyring_free(keyring_handler);
@@ -382,7 +382,7 @@ PurplePluginInfo plugininfo =
GNOMEKEYRING_ID, /* id */
GNOMEKEYRING_NAME, /* name */
GNOMEKEYRING_VERSION, /* version */
- "Internal Keyring Plugin", /* summary */
+ "GNOME Keyring Plugin", /* summary */
GNOMEKEYRING_DESCRIPTION, /* description */
GNOMEKEYRING_AUTHOR, /* author */
"N/A", /* homepage */
@@ -402,7 +402,7 @@ init_plugin(PurplePlugin *plugin)
static void
init_plugin(PurplePlugin *plugin)
{
- purple_debug_info("Gnome Keyring plugin", "init plugin called.\n");
+ purple_debug_info("keyring-gnome", "Init plugin called.\n");
}
PURPLE_INIT_PLUGIN(gnome_keyring, init_plugin, plugininfo)
============================================================
--- libpurple/plugins/keyrings/internalkeyring.c 937e604ebea8227c7dc34c269a1ce202d11ac891
+++ libpurple/plugins/keyrings/internalkeyring.c 532614a7dd605bf9eb925196b9a88d7b1ddca318
@@ -83,7 +83,7 @@ internal_keyring_read(PurpleAccount *acc
ACTIVATE();
- purple_debug_info("Internal Keyring",
+ purple_debug_info("keyring-internal",
"Reading password for account %s (%s).\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
@@ -95,7 +95,7 @@ internal_keyring_read(PurpleAccount *acc
cb(account, password, NULL, data);
} else {
error = g_error_new(PURPLE_KEYRING_ERROR,
- PURPLE_KEYRING_ERROR_NOPASSWD, "password not found");
+ PURPLE_KEYRING_ERROR_NOPASSWD, "Password not found.");
if (cb != NULL)
cb(account, NULL, error, data);
g_error_free(error);
@@ -114,14 +114,14 @@ internal_keyring_save(PurpleAccount *acc
if (password == NULL || *password == '\0') {
g_hash_table_remove(internal_keyring_passwords, account);
- purple_debug_info("Internal Keyring",
+ purple_debug_info("keyring-internal",
"Deleted password for account %s (%s).\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
} else {
copy = g_strdup(password);
SET_PASSWORD((void *)account, copy); /* cast prevents warning because account is const */
- purple_debug_info("Internal Keyring",
+ purple_debug_info("keyring-internal",
"Updated password for account %s (%s).\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
@@ -152,7 +152,7 @@ internal_keyring_import_password(PurpleA
ACTIVATE();
- purple_debug_info("Internal keyring", "Importing password");
+ purple_debug_info("keyring-internal", "Importing password.\n");
if (account != NULL &&
data != NULL &&
@@ -163,7 +163,7 @@ internal_keyring_import_password(PurpleA
return TRUE;
} else {
- *error = g_error_new(PURPLE_KEYRING_ERROR, PURPLE_KEYRING_ERROR_NOPASSWD, "no password for account");
+ *error = g_error_new(PURPLE_KEYRING_ERROR, PURPLE_KEYRING_ERROR_NOPASSWD, "No password for account.");
return FALSE;
}
@@ -182,8 +182,7 @@ internal_keyring_export_password(PurpleA
ACTIVATE();
- purple_debug_info("Internal keyring",
- "Exporting password");
+ purple_debug_info("keyring-internal", "Exporting password.\n");
password = GET_PASSWORD(account);
@@ -283,7 +282,7 @@ init_plugin(PurplePlugin *plugin)
static void
init_plugin(PurplePlugin *plugin)
{
- purple_debug_info("internalkeyring", "init plugin called.\n");
+ purple_debug_info("keyring-internal", "Init plugin called.\n");
}
PURPLE_INIT_PLUGIN(internal_keyring, init_plugin, plugininfo)
More information about the Commits
mailing list