summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-19 16:16:28 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-19 16:16:28 +0100
commit5406d564fb112d7c2f0d682ec547372219d72494 (patch)
treea7aace79922e8589a47beb9436bce654f9dd8adf
parent938db9ac567ffc8d7bc60ba382f0f4fd81bbdaa8 (diff)
downloadexchange-5406d564fb112d7c2f0d682ec547372219d72494.tar.gz
exchange-5406d564fb112d7c2f0d682ec547372219d72494.tar.bz2
exchange-5406d564fb112d7c2f0d682ec547372219d72494.zip
-style fixes
-rw-r--r--src/testing/testing_api_loop.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 0cd1fa51d..7b1387b59 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -98,8 +98,7 @@ TALER_TESTING_interpreter_lookup_command (struct TALER_TESTING_Interpreter *is,
* Obtain main execution context for the main loop.
*/
struct GNUNET_CURL_Context *
-TALER_TESTING_interpreter_get_context
- (struct TALER_TESTING_Interpreter *is)
+TALER_TESTING_interpreter_get_context (struct TALER_TESTING_Interpreter *is)
{
return is->ctx;
}
@@ -230,7 +229,6 @@ interpreter_run (void *cls)
struct TALER_TESTING_Command *cmd = &is->commands[is->ip];
is->task = NULL;
-
if (NULL == cmd->label)
{
@@ -321,7 +319,7 @@ do_shutdown (void *cls)
/**
* Function run when the test terminates (good or bad) with timeout.
*
- * @param cls NULL
+ * @param cls the `struct TALER_TESTING_Interpreter *`
*/
static void
do_timeout (void *cls)
@@ -339,7 +337,7 @@ do_timeout (void *cls)
* Task triggered whenever we receive a SIGCHLD (child
* process died).
*
- * @param cls closure
+ * @param cls the `struct TALER_TESTING_Interpreter *`
*/
static void
maint_child_death (void *cls)
@@ -455,12 +453,14 @@ TALER_TESTING_run2 (struct TALER_TESTING_Interpreter *is,
memcpy (is->commands,
commands,
sizeof (struct TALER_TESTING_Command) * i);
- is->timeout_task = GNUNET_SCHEDULER_add_delayed
- (timeout,
- &do_timeout,
- is);
- GNUNET_SCHEDULER_add_shutdown (&do_shutdown, is);
- is->task = GNUNET_SCHEDULER_add_now (&interpreter_run, is);
+ is->timeout_task = GNUNET_SCHEDULER_add_delayed (
+ timeout,
+ &do_timeout,
+ is);
+ GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
+ is);
+ is->task = GNUNET_SCHEDULER_add_now (&interpreter_run,
+ is);
}
@@ -541,12 +541,13 @@ TALER_TESTING_cert_cb (void *cls,
hr->http_status,
(int) hr->ec);
TALER_EXCHANGE_disconnect (is->exchange);
- GNUNET_assert (NULL != (is->exchange
- = TALER_EXCHANGE_connect (is->ctx,
- main_ctx->exchange_url,
- &TALER_TESTING_cert_cb,
- main_ctx,
- TALER_EXCHANGE_OPTION_END)));
+ GNUNET_assert (
+ NULL != (is->exchange
+ = TALER_EXCHANGE_connect (is->ctx,
+ main_ctx->exchange_url,
+ &TALER_TESTING_cert_cb,
+ main_ctx,
+ TALER_EXCHANGE_OPTION_END)));
return;
}
else
@@ -663,13 +664,14 @@ main_wrapper_exchange_connect (void *cls)
is->timeout_task = GNUNET_SCHEDULER_add_shutdown (&do_abort,
main_ctx);
is->working = GNUNET_YES;
- GNUNET_break
- (NULL != (is->exchange =
- TALER_EXCHANGE_connect (is->ctx,
- exchange_url,
- &TALER_TESTING_cert_cb,
- main_ctx,
- TALER_EXCHANGE_OPTION_END)));
+ GNUNET_assert (NULL == is->exchange);
+ GNUNET_break (
+ NULL != (is->exchange =
+ TALER_EXCHANGE_connect (is->ctx,
+ exchange_url,
+ &TALER_TESTING_cert_cb,
+ main_ctx,
+ TALER_EXCHANGE_OPTION_END)));
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Starting main test loop\n");
main_ctx->main_cb (main_ctx->main_cb_cls,
@@ -802,7 +804,10 @@ TALER_TESTING_setup (TALER_TESTING_Main main_cb,
struct GNUNET_OS_Process *exchanged,
int exchange_connect)
{
- struct TALER_TESTING_Interpreter is;
+ struct TALER_TESTING_Interpreter is = {
+ .cfg = cfg,
+ .exchanged = exchanged
+ };
struct MainContext main_ctx = {
.main_cb = main_cb,
.main_cb_cls = main_cb_cls,
@@ -811,11 +816,6 @@ TALER_TESTING_setup (TALER_TESTING_Main main_cb,
};
struct GNUNET_SIGNAL_Context *shc_chld;
- memset (&is,
- 0,
- sizeof (is));
- is.exchanged = exchanged;
- is.cfg = cfg;
if (GNUNET_OK !=
load_keys (&is))
return GNUNET_SYSERR;