aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r--src/testing/testing_api_loop.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 36e9da220..95d6b88e6 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -122,21 +122,19 @@ get_command (struct GNUNET_TESTING_Interpreter *is,
122 122
123 if (GNUNET_TESTING_cmd_is_batch_ (cmd)) 123 if (GNUNET_TESTING_cmd_is_batch_ (cmd))
124 { 124 {
125#define BATCH_INDEX 1 125 struct GNUNET_TESTING_Command **batch;
126 const struct GNUNET_TESTING_Command *batch;
127 struct GNUNET_TESTING_Command *current; 126 struct GNUNET_TESTING_Command *current;
128 const struct GNUNET_TESTING_Command *icmd; 127 const struct GNUNET_TESTING_Command *icmd;
129 const struct GNUNET_TESTING_Command *match; 128 const struct GNUNET_TESTING_Command *match;
130 129
131 current = GNUNET_TESTING_cmd_batch_get_current_ (cmd); 130 current = GNUNET_TESTING_cmd_batch_get_current_ (cmd);
132 GNUNET_assert (GNUNET_OK == 131 GNUNET_assert (GNUNET_OK ==
133 GNUNET_TESTING_get_trait_cmd (cmd, 132 GNUNET_TESTING_get_trait_batch_cmds (cmd,
134 BATCH_INDEX, 133 &batch));
135 &batch));
136 /* We must do the loop forward, but we can find the last match */ 134 /* We must do the loop forward, but we can find the last match */
137 match = NULL; 135 match = NULL;
138 for (unsigned int j = 0; 136 for (unsigned int j = 0;
139 NULL != (icmd = &batch[j])->label; 137 NULL != (icmd = &(*batch)[j])->label;
140 j++) 138 j++)
141 { 139 {
142 if (current == icmd) 140 if (current == icmd)
@@ -383,7 +381,7 @@ interpreter_run (void *cls)
383 finish_test (is); 381 finish_test (is);
384 return; 382 return;
385 } 383 }
386 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 384 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
387 "Running command `%s'\n", 385 "Running command `%s'\n",
388 cmd->label); 386 cmd->label);
389 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 387 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,