From 3a303770b4b0c1444db0bb89ecd6e2adc05e898e Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 20 Jun 2018 13:31:28 +0200 Subject: Meta-CMD-aware instruction pointer. The main IP from the testing loop gets incremented ONLY IF the command being processed is NOT a "meta" one. Meta CMDs have their own internal IP. --- src/exchange-lib/testing_api_loop.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/exchange-lib/testing_api_loop.c') diff --git a/src/exchange-lib/testing_api_loop.c b/src/exchange-lib/testing_api_loop.c index 03485068..7293aa08 100644 --- a/src/exchange-lib/testing_api_loop.c +++ b/src/exchange-lib/testing_api_loop.c @@ -164,12 +164,15 @@ interpreter_run (void *cls); * Current command is done, run the next one. */ void -TALER_TESTING_interpreter_next (struct TALER_TESTING_Interpreter *i) +TALER_TESTING_interpreter_next (struct TALER_TESTING_Interpreter *is) { - if (GNUNET_SYSERR == i->result) + if (GNUNET_SYSERR == is->result) return; /* ignore, we already failed! */ - i->ip++; - i->task = GNUNET_SCHEDULER_add_now (&interpreter_run, i); + + if (GNUNET_NO == is->commands[is->ip].meta) + is->ip++; + + is->task = GNUNET_SCHEDULER_add_now (&interpreter_run, is); } -- cgit v1.2.3