Skip to content

Commit

Permalink
[#220] Decrypt works on multiple directories
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed Mar 19, 2024
1 parent 189a54e commit fd61360
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/libpgmoneta/wf_encryption.c
Expand Up @@ -181,7 +181,6 @@ encryption_execute(int server, char* identifier, struct node* i_nodes, struct no
static int
decryption_execute(int server, char* identifier, struct node* i_nodes, struct node** o_nodes)
{
char* root = NULL;
char* d = NULL;
char* to = NULL;
char* id = NULL;
Expand Down Expand Up @@ -244,7 +243,6 @@ decryption_execute(int server, char* identifier, struct node* i_nodes, struct no
id = identifier;
}

root = pgmoneta_get_node_string(*o_nodes, "root");
to = pgmoneta_get_node_string(*o_nodes, "to");

if (to != NULL)
Expand All @@ -264,7 +262,7 @@ decryption_execute(int server, char* identifier, struct node* i_nodes, struct no
pgmoneta_workers_initialize(number_of_workers, &workers);
}

pgmoneta_decrypt_directory(root, workers);
pgmoneta_decrypt_directory(d, workers);

if (number_of_workers > 0)
{
Expand All @@ -280,7 +278,7 @@ decryption_execute(int server, char* identifier, struct node* i_nodes, struct no
memset(&elapsed[0], 0, sizeof(elapsed));
sprintf(&elapsed[0], "%02i:%02i:%02i", hours, minutes, seconds);

pgmoneta_log_debug("Decryption: %s/%s (Elapsed: %s)", config->servers[server].name, identifier, &elapsed[0]);
pgmoneta_log_debug("Decryption: %s/%s (Elapsed: %s)", config->servers[server].name, id, &elapsed[0]);

for (int i = 0; i < number_of_backups; i++)
{
Expand Down

0 comments on commit fd61360

Please sign in to comment.