diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-10 08:10:44 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-10 08:10:44 +0200 |
commit | a97983ddb198c4da1a76837a37af0940d59cb36a (patch) | |
tree | c5e9ef8b579edc4655502856c9f80cbdd84fa19b /src/testing/testing_api_twister_helpers.c | |
parent | c2a0196f16d24bc5c80ec99e13487a337ffb347b (diff) | |
download | exchange-a97983ddb198c4da1a76837a37af0940d59cb36a.tar.gz exchange-a97983ddb198c4da1a76837a37af0940d59cb36a.tar.bz2 exchange-a97983ddb198c4da1a76837a37af0940d59cb36a.zip |
indentation and logging fixes
Diffstat (limited to 'src/testing/testing_api_twister_helpers.c')
-rw-r--r-- | src/testing/testing_api_twister_helpers.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/testing/testing_api_twister_helpers.c b/src/testing/testing_api_twister_helpers.c index 5f8663d46..935d8bcc1 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); |