diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-03 20:57:01 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-05 16:50:16 +0200 |
commit | 49f466df401259248c5d187374655492d4b4eec7 (patch) | |
tree | 71d85be4a5ecabea8dac72670ca6b1d4c7c085aa /src/testing/testing_api_loop.c | |
parent | 2279c8ab17f641c02fd47a0fb58428ae3b96c920 (diff) | |
download | exchange-49f466df401259248c5d187374655492d4b4eec7.tar.xz |
move rewind command to exchange, add proper support for rewinding in batches, modify API to rewind to label
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r-- | src/testing/testing_api_loop.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c index 9b494da0c..af4a63c6a 100644 --- a/src/testing/testing_api_loop.c +++ b/src/testing/testing_api_loop.c @@ -69,6 +69,7 @@ TALER_TESTING_interpreter_lookup_command (struct TALER_TESTING_Interpreter *is, #define BATCH_INDEX 1 struct TALER_TESTING_Command *batch; struct TALER_TESTING_Command *current; + struct TALER_TESTING_Command *icmd; const struct TALER_TESTING_Command *match; current = TALER_TESTING_cmd_batch_get_current (cmd); @@ -79,15 +80,15 @@ TALER_TESTING_interpreter_lookup_command (struct TALER_TESTING_Interpreter *is, /* We must do the loop forward, but we can find the last match */ match = NULL; for (unsigned int j = 0; - NULL != (cmd = &batch[j])->label; + NULL != (icmd = &batch[j])->label; j++) { - if (current == cmd) + if (current == icmd) break; /* do not go past current command */ - if ( (NULL != cmd->label) && - (0 == strcmp (cmd->label, + if ( (NULL != icmd->label) && + (0 == strcmp (icmd->label, label)) ) - match = cmd; + match = icmd; } if (NULL != match) return match; |