[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/03: indentation and logging fixes
From: |
gnunet |
Subject: |
[taler-exchange] 02/03: indentation and logging fixes |
Date: |
Mon, 10 Aug 2020 08:15:31 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit a97983ddb198c4da1a76837a37af0940d59cb36a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Aug 10 08:10:44 2020 +0200
indentation and logging fixes
---
src/testing/test_bank_api.c | 6 +++---
src/testing/test_bank_api_twisted.c | 12 +++++------
src/testing/testing_api_cmd_bank_transfer.c | 6 +++---
src/testing/testing_api_twister_helpers.c | 31 ++++++++++++++++++-----------
4 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/src/testing/test_bank_api.c b/src/testing/test_bank_api.c
index 3e34974b..8e788493 100644
--- a/src/testing/test_bank_api.c
+++ b/src/testing/test_bank_api.c
@@ -197,9 +197,9 @@ main (int argc,
return 77;
}
- if (NULL == (bankd = TALER_TESTING_run_bank (CONFIG_FILE_PYBANK,
- bc.exchange_auth.
- wire_gateway_url)))
+ if (NULL == (bankd = TALER_TESTING_run_bank (
+ CONFIG_FILE_PYBANK,
+ bc.exchange_auth.wire_gateway_url)))
{
GNUNET_break (0);
return 77;
diff --git a/src/testing/test_bank_api_twisted.c
b/src/testing/test_bank_api_twisted.c
index d17c3c81..b3e861e5 100644
--- a/src/testing/test_bank_api_twisted.c
+++ b/src/testing/test_bank_api_twisted.c
@@ -174,8 +174,8 @@ main (int argc,
else
cfgfilename = CONFIG_FILE_PYBANK;
- if (NULL == (twister_url = TALER_TWISTER_prepare_twister
- (cfgfilename)))
+ if (NULL == (twister_url = TALER_TWISTER_prepare_twister (
+ cfgfilename)))
{
GNUNET_break (0);
return 77;
@@ -189,7 +189,6 @@ main (int argc,
GNUNET_free (twister_url);
return 77;
}
-
if (GNUNET_YES == with_fakebank)
{
TALER_LOG_DEBUG ("Running against the Fakebank.\n");
@@ -217,9 +216,9 @@ main (int argc,
return 77;
}
- if (NULL == (bankd = TALER_TESTING_run_bank (cfgfilename,
- bc.exchange_auth.
- wire_gateway_url)))
+ if (NULL == (bankd = TALER_TESTING_run_bank (
+ cfgfilename,
+ bc.exchange_auth.wire_gateway_url)))
{
GNUNET_break (0);
GNUNET_free (twister_url);
@@ -227,6 +226,7 @@ main (int argc,
}
}
+ sleep (5);
ret = GNUNET_CONFIGURATION_parse_and_run (cfgfilename,
&setup_with_cfg,
NULL);
diff --git a/src/testing/testing_api_cmd_bank_transfer.c
b/src/testing/testing_api_cmd_bank_transfer.c
index 7e7174b2..36d5e891 100644
--- a/src/testing/testing_api_cmd_bank_transfer.c
+++ b/src/testing/testing_api_cmd_bank_transfer.c
@@ -209,7 +209,7 @@ confirmation_cb (void *cls,
}
GNUNET_break (0);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Fakebank returned HTTP status %u/%d\n",
+ "Bank returned HTTP status %u/%d\n",
http_status,
(int) ec);
TALER_TESTING_interpreter_fail (is);
@@ -252,8 +252,8 @@ transfer_run (void *cls,
&buf_size);
fts->is = is;
fts->weh
- = TALER_BANK_transfer
- (TALER_TESTING_interpreter_get_context (is),
+ = TALER_BANK_transfer (
+ TALER_TESTING_interpreter_get_context (is),
&fts->auth,
buf,
buf_size,
diff --git a/src/testing/testing_api_twister_helpers.c
b/src/testing/testing_api_twister_helpers.c
index 5f8663d4..935d8bcc 100644
--- a/src/testing/testing_api_twister_helpers.c
+++ b/src/testing/testing_api_twister_helpers.c
@@ -44,13 +44,16 @@ TALER_TWISTER_prepare_twister (const char *config_filename)
cfg = GNUNET_CONFIGURATION_create ();
- if (GNUNET_OK != GNUNET_CONFIGURATION_load
- (cfg, config_filename))
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_load (cfg,
+ config_filename))
TWISTER_FAIL ();
- if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number
- (cfg, "twister",
- "HTTP_PORT", &port))
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (cfg,
+ "twister",
+ "HTTP_PORT",
+ &port))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"twister",
@@ -61,8 +64,9 @@ TALER_TWISTER_prepare_twister (const char *config_filename)
GNUNET_CONFIGURATION_destroy (cfg);
- if (GNUNET_OK != GNUNET_NETWORK_test_port_free
- (IPPROTO_TCP, (uint16_t) port))
+ if (GNUNET_OK !=
+ GNUNET_NETWORK_test_port_free (IPPROTO_TCP,
+ (uint16_t) port))
{
fprintf (stderr,
"Required port %llu not available, skipping.\n",
@@ -119,8 +123,10 @@ TALER_TWISTER_run_twister (const char *config_filename)
}
- if (GNUNET_SYSERR == GNUNET_OS_process_wait_status
- (client_proc, &type, &code))
+ if (GNUNET_SYSERR ==
+ GNUNET_OS_process_wait_status (client_proc,
+ &type,
+ &code))
{
GNUNET_OS_process_destroy (client_proc);
GNUNET_OS_process_kill (proc, SIGTERM);
@@ -131,7 +137,8 @@ TALER_TWISTER_run_twister (const char *config_filename)
if ( (type == GNUNET_OS_PROCESS_EXITED) &&
(0 != code) )
{
- fprintf (stderr, "Failed to check twister works.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to check twister works.\n");
GNUNET_OS_process_destroy (client_proc);
GNUNET_OS_process_kill (proc, SIGTERM);
GNUNET_OS_process_wait (proc);
@@ -141,8 +148,8 @@ TALER_TWISTER_run_twister (const char *config_filename)
if ( (type != GNUNET_OS_PROCESS_EXITED) ||
(0 != code) )
{
- fprintf (stderr, "Unexpected error running"
- " `taler-twister'!\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Unexpected error running `taler-twister'!\n");
GNUNET_OS_process_destroy (client_proc);
GNUNET_OS_process_kill (proc, SIGTERM);
GNUNET_OS_process_wait (proc);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.