exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit aee40a64055db091e1478d66110cd620e8f3c91f
parent c1935c6bdb302b719cd82102eb2a2ea498690380
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 11 Oct 2026 15:06:13 +0200

handle rewinding to zero corner case

Diffstat:
Msrc/testing/testing_api_loop.c | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c @@ -204,10 +204,20 @@ TALER_TESTING_interpreter_next (struct TALER_TESTING_Interpreter *is) { static unsigned long long ipc; static struct GNUNET_TIME_Absolute last_report; - struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; + struct TALER_TESTING_Command *cmd; if (GNUNET_SYSERR == is->result) return; /* ignore, we already failed! */ + if (0 > is->ip) + { + /* We were rewound to before the first command; there is no + command to finish, just (re)start at the beginning. */ + is->ip = 0; + is->task = GNUNET_SCHEDULER_add_now (&interpreter_run, + is); + return; + } + cmd = &is->commands[is->ip]; if (TALER_TESTING_cmd_is_batch (cmd)) { if (TALER_TESTING_cmd_batch_next (is,