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
}
}
+ 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 */
debug_print("Reencrypting passwords in block (%d/%s).\n",
block->block_type, block->block_name);
- if (g_hash_table_size(block->entries) == 0)
+ if (block->entries == NULL || g_hash_table_size(block->entries) == 0)
continue;
keys = g_hash_table_get_keys(block->entries);
continue; /* Just in case. */
/* Do not save empty blocks. */
- if (g_hash_table_size(block->entries) == 0)
+ if (block->entries == NULL || g_hash_table_size(block->entries) == 0)
continue;
/* Prepare the section header string and write it out. */