diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-20 13:31:28 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-06-20 13:31:28 +0200 |
commit | 3a303770b4b0c1444db0bb89ecd6e2adc05e898e (patch) | |
tree | c75be1250132d08e61c72e80d5131ae87e6ca1a5 /src/exchange-lib/testing_api_loop.c | |
parent | 1d83e013200dd7a18afe95e7b3d21be9d7daddb9 (diff) | |
download | exchange-3a303770b4b0c1444db0bb89ecd6e2adc05e898e.tar.gz exchange-3a303770b4b0c1444db0bb89ecd6e2adc05e898e.tar.bz2 exchange-3a303770b4b0c1444db0bb89ecd6e2adc05e898e.zip |
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.
Diffstat (limited to 'src/exchange-lib/testing_api_loop.c')
-rw-r--r-- | src/exchange-lib/testing_api_loop.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/exchange-lib/testing_api_loop.c b/src/exchange-lib/testing_api_loop.c index 03485068f..7293aa080 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); } |