aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-03-13 04:30:07 +0100
committerChristian Grothoff <christian@grothoff.org>2019-03-16 02:28:42 +0100
commit81e8b65836257c111eed82a0ac2af4cebb991de6 (patch)
tree5290bdf43b703b5950f4c46cab9770b0879416af /src
parent0f7d8fbe61501c8b1c2f8e4e3fcd4ee4c432b4d9 (diff)
fix swapped arguments, and add const where required, do not free const ptr
Diffstat (limited to 'src')
-rw-r--r--src/benchmark/taler-exchange-benchmark.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 785bfbfd4..59fcc6599 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -223,6 +223,7 @@ pick_exchange_account_cb (void *cls,
strlen ("account-")))
{
const char **s = cls;
+
*s = section;
}
}
@@ -568,7 +569,6 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
if ( (MODE_CLIENT == mode) || (MODE_BOTH == mode) )
{
-
/* start fakebank */
fakebank = fork ();
if (0 == fakebank)
@@ -646,7 +646,9 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
remote_dir,
config_file);
- printf ("remote command: %s\n", remote_cmd);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "remote command: %s\n",
+ remote_cmd);
exchange_slave = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_ALL,
@@ -665,6 +667,9 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
remotely */
if (0 != TALER_TESTING_wait_exchange_ready (exchange_url))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to detect running exchange at `%s'\n",
+ exchange_url);
GNUNET_OS_process_kill (exchanged,
SIGTERM);
if ( (MODE_BOTH == mode) || (MODE_CLIENT == mode))
@@ -911,7 +916,7 @@ main (int argc,
{
- char *bank_details_section;
+ const char *bank_details_section;
char *exchange_payto_url;
GNUNET_CONFIGURATION_iterate_sections
@@ -935,7 +940,6 @@ main (int argc,
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
bank_details_section,
"url");
- GNUNET_free (bank_details_section);
return BAD_CONFIG_FILE;
}
@@ -947,7 +951,6 @@ main (int argc,
_("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);
@@ -982,7 +985,7 @@ main (int argc,
}
else
{
- if (GNUNET_OK !=
+ if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
"exchange",
"BASE_URL",