summaryrefslogtreecommitdiff
path: root/src/benchmark
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-03-13 04:11:35 +0100
committerChristian Grothoff <christian@grothoff.org>2019-03-13 04:11:35 +0100
commitae4b240ec29803be6bd56caecf8df413d7bf3851 (patch)
treea0313036936122a18d3fca31905dea9b977fad81 /src/benchmark
parente235945df9eefc32265053d8527f4bd15d47ab6d (diff)
downloadexchange-ae4b240ec29803be6bd56caecf8df413d7bf3851.tar.gz
exchange-ae4b240ec29803be6bd56caecf8df413d7bf3851.tar.bz2
exchange-ae4b240ec29803be6bd56caecf8df413d7bf3851.zip
return proper error message instead of aborting, fix a few minor memory leaks in taler-exchange-benchmark
Diffstat (limited to 'src/benchmark')
-rw-r--r--src/benchmark/benchmark.conf3
-rw-r--r--src/benchmark/taler-exchange-benchmark.c38
2 files changed, 33 insertions, 8 deletions
diff --git a/src/benchmark/benchmark.conf b/src/benchmark/benchmark.conf
index a160cc1c..8d3e060d 100644
--- a/src/benchmark/benchmark.conf
+++ b/src/benchmark/benchmark.conf
@@ -29,6 +29,9 @@ base_url = "http://localhost:8081/"
# Keep it short so the test runs fast.
lookahead_sign = 12 h
+[auditor]
+BASE_URL = "http://localhost:8085/"
+
[exchangedb-postgres]
config = "postgres:///talercheck"
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 27020a71..d1ea272e 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -908,20 +908,42 @@ main (int argc,
GNUNET_CONFIGURATION_iterate_sections
(cfg,
- pick_exchange_account_cb,
+ &pick_exchange_account_cb,
&bank_details_section);
- GNUNET_assert (NULL != bank_details_section);
- GNUNET_assert
- (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string
+ if (NULL == bank_details_section)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Missing specification of bank account in configuration\n"));
+ return BAD_CONFIG_FILE;
+ }
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string
(cfg,
bank_details_section,
"url",
- &exchange_payto_url));
+ &exchange_payto_url))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ bank_details_section,
+ "url");
+ GNUNET_free (bank_details_section);
+ return BAD_CONFIG_FILE;
+ }
- GNUNET_assert
- (TALER_EC_NONE == parse_payto (exchange_payto_url,
- &exchange_bank_account));
+ if (TALER_EC_NONE !=
+ parse_payto (exchange_payto_url,
+ &exchange_bank_account))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Malformed payto:// URL `%s' in configuration\n"),
+ exchange_payto_url);
+ GNUNET_free (exchange_payto_url);
+ GNUNET_free (bank_details_section);
+ return BAD_CONFIG_FILE;
+ }
+ GNUNET_free (exchange_payto_url);
+ GNUNET_free (bank_details_section);
}
if ( (MODE_EXCHANGE == mode) || (MODE_BOTH == mode) )
{