-style fixes
This commit is contained in:
parent
938db9ac56
commit
5406d564fb
@ -98,8 +98,7 @@ TALER_TESTING_interpreter_lookup_command (struct TALER_TESTING_Interpreter *is,
|
|||||||
* Obtain main execution context for the main loop.
|
* Obtain main execution context for the main loop.
|
||||||
*/
|
*/
|
||||||
struct GNUNET_CURL_Context *
|
struct GNUNET_CURL_Context *
|
||||||
TALER_TESTING_interpreter_get_context
|
TALER_TESTING_interpreter_get_context (struct TALER_TESTING_Interpreter *is)
|
||||||
(struct TALER_TESTING_Interpreter *is)
|
|
||||||
{
|
{
|
||||||
return is->ctx;
|
return is->ctx;
|
||||||
}
|
}
|
||||||
@ -230,7 +229,6 @@ interpreter_run (void *cls)
|
|||||||
struct TALER_TESTING_Command *cmd = &is->commands[is->ip];
|
struct TALER_TESTING_Command *cmd = &is->commands[is->ip];
|
||||||
|
|
||||||
is->task = NULL;
|
is->task = NULL;
|
||||||
|
|
||||||
if (NULL == cmd->label)
|
if (NULL == cmd->label)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -321,7 +319,7 @@ do_shutdown (void *cls)
|
|||||||
/**
|
/**
|
||||||
* Function run when the test terminates (good or bad) with timeout.
|
* Function run when the test terminates (good or bad) with timeout.
|
||||||
*
|
*
|
||||||
* @param cls NULL
|
* @param cls the `struct TALER_TESTING_Interpreter *`
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
do_timeout (void *cls)
|
do_timeout (void *cls)
|
||||||
@ -339,7 +337,7 @@ do_timeout (void *cls)
|
|||||||
* Task triggered whenever we receive a SIGCHLD (child
|
* Task triggered whenever we receive a SIGCHLD (child
|
||||||
* process died).
|
* process died).
|
||||||
*
|
*
|
||||||
* @param cls closure
|
* @param cls the `struct TALER_TESTING_Interpreter *`
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
maint_child_death (void *cls)
|
maint_child_death (void *cls)
|
||||||
@ -455,12 +453,14 @@ TALER_TESTING_run2 (struct TALER_TESTING_Interpreter *is,
|
|||||||
memcpy (is->commands,
|
memcpy (is->commands,
|
||||||
commands,
|
commands,
|
||||||
sizeof (struct TALER_TESTING_Command) * i);
|
sizeof (struct TALER_TESTING_Command) * i);
|
||||||
is->timeout_task = GNUNET_SCHEDULER_add_delayed
|
is->timeout_task = GNUNET_SCHEDULER_add_delayed (
|
||||||
(timeout,
|
timeout,
|
||||||
&do_timeout,
|
&do_timeout,
|
||||||
is);
|
is);
|
||||||
GNUNET_SCHEDULER_add_shutdown (&do_shutdown, is);
|
GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
|
||||||
is->task = GNUNET_SCHEDULER_add_now (&interpreter_run, is);
|
is);
|
||||||
|
is->task = GNUNET_SCHEDULER_add_now (&interpreter_run,
|
||||||
|
is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -541,12 +541,13 @@ TALER_TESTING_cert_cb (void *cls,
|
|||||||
hr->http_status,
|
hr->http_status,
|
||||||
(int) hr->ec);
|
(int) hr->ec);
|
||||||
TALER_EXCHANGE_disconnect (is->exchange);
|
TALER_EXCHANGE_disconnect (is->exchange);
|
||||||
GNUNET_assert (NULL != (is->exchange
|
GNUNET_assert (
|
||||||
= TALER_EXCHANGE_connect (is->ctx,
|
NULL != (is->exchange
|
||||||
main_ctx->exchange_url,
|
= TALER_EXCHANGE_connect (is->ctx,
|
||||||
&TALER_TESTING_cert_cb,
|
main_ctx->exchange_url,
|
||||||
main_ctx,
|
&TALER_TESTING_cert_cb,
|
||||||
TALER_EXCHANGE_OPTION_END)));
|
main_ctx,
|
||||||
|
TALER_EXCHANGE_OPTION_END)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -663,13 +664,14 @@ main_wrapper_exchange_connect (void *cls)
|
|||||||
is->timeout_task = GNUNET_SCHEDULER_add_shutdown (&do_abort,
|
is->timeout_task = GNUNET_SCHEDULER_add_shutdown (&do_abort,
|
||||||
main_ctx);
|
main_ctx);
|
||||||
is->working = GNUNET_YES;
|
is->working = GNUNET_YES;
|
||||||
GNUNET_break
|
GNUNET_assert (NULL == is->exchange);
|
||||||
(NULL != (is->exchange =
|
GNUNET_break (
|
||||||
TALER_EXCHANGE_connect (is->ctx,
|
NULL != (is->exchange =
|
||||||
exchange_url,
|
TALER_EXCHANGE_connect (is->ctx,
|
||||||
&TALER_TESTING_cert_cb,
|
exchange_url,
|
||||||
main_ctx,
|
&TALER_TESTING_cert_cb,
|
||||||
TALER_EXCHANGE_OPTION_END)));
|
main_ctx,
|
||||||
|
TALER_EXCHANGE_OPTION_END)));
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Starting main test loop\n");
|
"Starting main test loop\n");
|
||||||
main_ctx->main_cb (main_ctx->main_cb_cls,
|
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,
|
struct GNUNET_OS_Process *exchanged,
|
||||||
int exchange_connect)
|
int exchange_connect)
|
||||||
{
|
{
|
||||||
struct TALER_TESTING_Interpreter is;
|
struct TALER_TESTING_Interpreter is = {
|
||||||
|
.cfg = cfg,
|
||||||
|
.exchanged = exchanged
|
||||||
|
};
|
||||||
struct MainContext main_ctx = {
|
struct MainContext main_ctx = {
|
||||||
.main_cb = main_cb,
|
.main_cb = main_cb,
|
||||||
.main_cb_cls = main_cb_cls,
|
.main_cb_cls = main_cb_cls,
|
||||||
@ -811,11 +816,6 @@ TALER_TESTING_setup (TALER_TESTING_Main main_cb,
|
|||||||
};
|
};
|
||||||
struct GNUNET_SIGNAL_Context *shc_chld;
|
struct GNUNET_SIGNAL_Context *shc_chld;
|
||||||
|
|
||||||
memset (&is,
|
|
||||||
0,
|
|
||||||
sizeof (is));
|
|
||||||
is.exchanged = exchanged;
|
|
||||||
is.cfg = cfg;
|
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
load_keys (&is))
|
load_keys (&is))
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
|
Loading…
Reference in New Issue
Block a user