[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 10/11: lookup in reverse order also inside of batch
From: |
gnunet |
Subject: |
[taler-exchange] 10/11: lookup in reverse order also inside of batch |
Date: |
Sat, 28 Mar 2020 21:57:30 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit bc57f007e44ee1634e7ccf617de3fb66b1dc34a5
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Mar 28 21:45:46 2020 +0100
lookup in reverse order also inside of batch
---
src/testing/testing_api_loop.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 7c3a7aaa..5bfb7fe0 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -68,20 +68,29 @@ TALER_TESTING_interpreter_lookup_command (struct
TALER_TESTING_Interpreter *is,
{
#define BATCH_INDEX 1
struct TALER_TESTING_Command *batch;
+ struct TALER_TESTING_Command *current;
+ const struct TALER_TESTING_Command *match;
+ current = TALER_TESTING_cmd_batch_get_current (cmd);
GNUNET_assert (GNUNET_OK ==
TALER_TESTING_get_trait_cmd (cmd,
BATCH_INDEX,
&batch));
+ /* 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;
j++)
{
+ if (current == cmd)
+ break; /* do not go past current command */
if ( (NULL != cmd->label) &&
(0 == strcmp (cmd->label,
label)) )
- return cmd;
+ match = cmd;
}
+ if (NULL != match)
+ return match;
}
}
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [taler-exchange] branch master updated (baaa8832 -> da1df35d), gnunet, 2020/03/28
- [taler-exchange] 04/11: do return correct timestamp also in fakebank implementation, gnunet, 2020/03/28
- [taler-exchange] 07/11: ignore generated config file, gnunet, 2020/03/28
- [taler-exchange] 10/11: lookup in reverse order also inside of batch,
gnunet <=
- [taler-exchange] 08/11: permit subtraction to result in zero, gnunet, 2020/03/28
- [taler-exchange] 09/11: do not re-use command label, gnunet, 2020/03/28
- [taler-exchange] 05/11: do return fees in history, gnunet, 2020/03/28
- [taler-exchange] 02/11: split recoup and revoke commands into two files for better readability, gnunet, 2020/03/28
- [taler-exchange] 01/11: skip tests if ports are unavailable, gnunet, 2020/03/28
- [taler-exchange] 03/11: implement #6049, gnunet, 2020/03/28
- [taler-exchange] 11/11: reserve history amount includes fee, add it, gnunet, 2020/03/28
- [taler-exchange] 06/11: ignore report directories, gnunet, 2020/03/28