summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_auditor_add.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-26 22:54:33 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-26 22:54:33 +0100
commit98f5960411077dd8be648cbd21fd495bb874f8fd (patch)
treef909142ed9fc01d9c4133b48f4164866641482b2 /src/testing/testing_api_cmd_auditor_add.c
parent1c1d4d9974d7a97bd157197adeb11cd759e2b931 (diff)
downloadexchange-98f5960411077dd8be648cbd21fd495bb874f8fd.tar.gz
exchange-98f5960411077dd8be648cbd21fd495bb874f8fd.tar.bz2
exchange-98f5960411077dd8be648cbd21fd495bb874f8fd.zip
cmd to del auditor
Diffstat (limited to 'src/testing/testing_api_cmd_auditor_add.c')
-rw-r--r--src/testing/testing_api_cmd_auditor_add.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/testing/testing_api_cmd_auditor_add.c b/src/testing/testing_api_cmd_auditor_add.c
index cfdcae15c..5112d1fb6 100644
--- a/src/testing/testing_api_cmd_auditor_add.c
+++ b/src/testing/testing_api_cmd_auditor_add.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2018-2020 Taler Systems SA
+ Copyright (C) 2020 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
/**
* @file testing/testing_api_cmd_auditor_add.c
* @brief command for testing /auditor_add.
- * @author Marcello Stanisci
+ * @author Christian Grothoff
*/
#include "platform.h"
#include "taler_json_lib.h"
@@ -112,6 +112,18 @@ auditor_add_run (void *cls,
now = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&now);
ds->is = is;
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_filename (is->cfg,
+ "auditor",
+ "BASE_URL",
+ &auditor_url))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "auditor",
+ "BASE_URL");
+ TALER_TESTING_interpreter_next (ds->is);
+ return;
+ }
if (ds->bad_sig)
{
memset (&master_sig,
@@ -134,6 +146,7 @@ auditor_add_run (void *cls,
"exchange-offline",
"MASTER_PRIV_FILE");
TALER_TESTING_interpreter_next (ds->is);
+ GNUNET_free (auditor_url);
return;
}
if (GNUNET_SYSERR ==
@@ -144,6 +157,7 @@ auditor_add_run (void *cls,
fn);
GNUNET_free (fn);
TALER_TESTING_interpreter_next (ds->is);
+ GNUNET_free (auditor_url);
return;
}
if (GNUNET_OK !=
@@ -156,11 +170,11 @@ auditor_add_run (void *cls,
fn);
GNUNET_free (fn);
TALER_TESTING_interpreter_next (ds->is);
+ GNUNET_free (auditor_url);
return;
}
GNUNET_free (fn);
-
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (is->cfg,
"auditor",
@@ -171,6 +185,7 @@ auditor_add_run (void *cls,
"auditor",
"AUDITOR_PRIV_FILE");
TALER_TESTING_interpreter_next (ds->is);
+ GNUNET_free (auditor_url);
return;
}
if (GNUNET_SYSERR ==
@@ -181,6 +196,7 @@ auditor_add_run (void *cls,
fn);
GNUNET_free (fn);
TALER_TESTING_interpreter_next (ds->is);
+ GNUNET_free (auditor_url);
return;
}
if (GNUNET_OK !=
@@ -193,6 +209,7 @@ auditor_add_run (void *cls,
fn);
GNUNET_free (fn);
TALER_TESTING_interpreter_next (ds->is);
+ GNUNET_free (auditor_url);
return;
}
GNUNET_free (fn);
@@ -218,18 +235,6 @@ auditor_add_run (void *cls,
}
}
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (is->cfg,
- "auditor",
- "BASE_URL",
- &auditor_url))
- {
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "auditor",
- "BASE_URL");
- TALER_TESTING_interpreter_next (ds->is);
- return;
- }
- if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (is->cfg,
"exchange",
"BASE_URL",