[Commits] [SCM] claws branch, master, updated. 3.17.0-126-g22a05e8
ticho at claws-mail.org
ticho at claws-mail.org
Fri Oct 19 23:36:55 CEST 2018
The branch, master has been updated
via 22a05e81e35409b293911e699cca8d54f0807ff0 (commit)
from 81bd77a29a2ce6974198c24dbf7ea9468201f365 (commit)
Summary of changes:
src/passwordstore.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit 22a05e81e35409b293911e699cca8d54f0807ff0
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Fri Oct 19 23:36:40 2018 +0200
Rework debug output in passwd_store_set() to be less confusing.
diff --git a/src/passwordstore.c b/src/passwordstore.c
index 7a6322a..6bab54c 100644
--- a/src/passwordstore.c
+++ b/src/passwordstore.c
@@ -155,16 +155,18 @@ gboolean passwd_store_set(PasswordBlockType block_type,
}
}
- debug_print("%s password for '%s' in block (%d/%s)%s\n",
- (p == NULL ? "Deleting" : "Storing"),
- password_id, block_type, block_name,
- (encrypted ? ", already encrypted" : "") );
-
if (p == NULL) {
/* NULL password was passed to us, so delete the entry with
- * corresponding id */
- g_hash_table_remove(block->entries, password_id);
+ * corresponding id, if it exists */
+ if (g_hash_table_lookup(block->entries, password_id) != NULL) {
+ debug_print("Deleting password for '%s' in block (%d/%s)\n",
+ password_id, block_type, block_name);
+ g_hash_table_remove(block->entries, password_id);
+ }
} else {
+ debug_print("Setting password for '%s' in block (%d/%s)%s\n",
+ password_id, block_type, block_name,
+ (encrypted ? ", already encrypted" : ""));
if (!encrypted) {
/* encrypt password before saving it */
if ((encrypted_password =
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list