Improve debug output in passwd_store_set().
authorAndrej Kacian <ticho@claws-mail.org>
Sun, 7 Oct 2018 17:16:15 +0000 (19:16 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Sun, 7 Oct 2018 17:16:15 +0000 (19:16 +0200)
src/passwordstore.c

index 97f44d3f57da4fbf25d8c8bcbfcc9a8d01218a28..377e18223e6c36d669a2f3841cf0a661b0367147 100644 (file)
@@ -121,11 +121,6 @@ gboolean passwd_store_set(PasswordBlockType block_type,
        else
                p = password;
 
-       debug_print("%s password '%s' in block (%d/%s)%s\n",
-                       (p == NULL ? "Deleting" : "Storing"),
-                       password_id, block_type, block_name,
-                       (encrypted ? ", already encrypted" : "") );
-
        /* find correct block (create if needed) */
        if ((block = _get_block(block_type, block_name)) == NULL) {
                /* If caller wants to delete a password, and even its block
@@ -140,6 +135,11 @@ 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 */