diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-03-19 19:17:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-03-19 19:17:56 +0100 |
commit | 749d9615d12127a33445ceae21a8fa388d2f64a1 (patch) | |
tree | ed93cfb3457ddde0b9ff6c527495bb5ad59f4dba /src/testing/testing_api_helpers_exchange.c | |
parent | 15489275ba72905a6f0d84238480569390475c00 (diff) | |
download | exchange-749d9615d12127a33445ceae21a8fa388d2f64a1.tar.xz |
concurrency requires strtok_r
Diffstat (limited to 'src/testing/testing_api_helpers_exchange.c')
-rw-r--r-- | src/testing/testing_api_helpers_exchange.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/testing/testing_api_helpers_exchange.c b/src/testing/testing_api_helpers_exchange.c index bed6bc8d5..56f8bd548 100644 --- a/src/testing/testing_api_helpers_exchange.c +++ b/src/testing/testing_api_helpers_exchange.c @@ -368,6 +368,11 @@ struct SignInfo * calling #TALER_TESTING_sign_keys_for_exchange. */ const char *auditor_sign_input_filename; + + /** + * Did we reset the database? + */ + int db_reset; }; @@ -448,23 +453,25 @@ sign_keys_for_exchange (void *cls, ret = GNUNET_SYSERR; goto fail; } - if (GNUNET_OK != - TALER_TESTING_run_auditor_exchange (si->config_filename, - exchange_master_pub, - si->ec->exchange_url, - GNUNET_NO)) + if ( (GNUNET_OK != + TALER_TESTING_run_auditor_exchange (si->config_filename, + exchange_master_pub, + si->ec->exchange_url, + GNUNET_NO)) && + (GNUNET_YES == si->db_reset) ) { GNUNET_free (signed_keys_out); ret = GNUNET_NO; goto fail; } - if (GNUNET_OK != - TALER_TESTING_run_auditor_sign (si->config_filename, - exchange_master_pub, - si->ec->auditor_url, - si->auditor_sign_input_filename, - signed_keys_out)) + if ( (GNUNET_OK != + TALER_TESTING_run_auditor_sign (si->config_filename, + exchange_master_pub, + si->ec->auditor_url, + si->auditor_sign_input_filename, + signed_keys_out)) && + (GNUNET_YES == si->db_reset) ) { GNUNET_free (signed_keys_out); GNUNET_free (exchange_master_pub); @@ -503,7 +510,8 @@ TALER_TESTING_prepare_exchange (const char *config_filename, struct SignInfo si = { .config_filename = config_filename, .ec = ec, - .auditor_sign_input_filename = "auditor.in" + .auditor_sign_input_filename = "auditor.in", + .db_reset = reset_db }; if (GNUNET_OK != |