indentation and logging fixes

This commit is contained in:
Christian Grothoff 2020-08-10 08:10:44 +02:00
parent c2a0196f16
commit a97983ddb1
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 31 additions and 24 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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,

View File

@ -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);