aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_cmd_netjail_start_testsystem.c5
-rw-r--r--src/testing/testing_api_cmd_netjail_stop_testsystem.c11
-rw-r--r--src/testing/testing_api_loop.c4
3 files changed, 12 insertions, 8 deletions
diff --git a/src/testing/testing_api_cmd_netjail_start_testsystem.c b/src/testing/testing_api_cmd_netjail_start_testsystem.c
index d24ad3d28..04d7eef44 100644
--- a/src/testing/testing_api_cmd_netjail_start_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_start_testsystem.c
@@ -222,7 +222,7 @@ netjail_exec_traits (void *cls,
222 222
223 223
224 struct GNUNET_TESTING_Trait traits[] = { 224 struct GNUNET_TESTING_Trait traits[] = {
225 GNUNET_TESTING_make_trait_helper_handles ((const void **) helper), 225 GNUNET_TESTING_make_trait_helper_handles (helper),
226 GNUNET_TESTING_trait_end () 226 GNUNET_TESTING_trait_end ()
227 }; 227 };
228 228
@@ -262,7 +262,6 @@ send_message_to_locals (
262 struct GNUNET_MessageHeader *header 262 struct GNUNET_MessageHeader *header
263 ) 263 )
264{ 264{
265 // unsigned int total_number = ns->local_m * ns->global_n + ns->known;
266 const struct GNUNET_HELPER_Handle *helper; 265 const struct GNUNET_HELPER_Handle *helper;
267 struct TestingSystemCount *tbc; 266 struct TestingSystemCount *tbc;
268 267
@@ -282,7 +281,7 @@ send_message_to_locals (
282 281
283 282
284 struct GNUNET_HELPER_SendHandle *sh = GNUNET_HELPER_send ( 283 struct GNUNET_HELPER_SendHandle *sh = GNUNET_HELPER_send (
285 helper, 284 (struct GNUNET_HELPER_Handle *) helper,
286 header, 285 header,
287 GNUNET_NO, 286 GNUNET_NO,
288 &clear_msg, 287 &clear_msg,
diff --git a/src/testing/testing_api_cmd_netjail_stop_testsystem.c b/src/testing/testing_api_cmd_netjail_stop_testsystem.c
index caf83ab0e..2e42056dc 100644
--- a/src/testing/testing_api_cmd_netjail_stop_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_stop_testsystem.c
@@ -100,8 +100,9 @@ stop_testing_system_run (void *cls,
100 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 100 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
101 "i: %u\n", 101 "i: %u\n",
102 i); 102 i);
103 GNUNET_HELPER_stop (helper[i - 1], 103 GNUNET_HELPER_stop (
104 GNUNET_YES); 104 (struct GNUNET_HELPER_Handle *) helper[i - 1],
105 GNUNET_YES);
105 } 106 }
106 107
107 for (int i = 1; i <= shs->global_n; i++) 108 for (int i = 1; i <= shs->global_n; i++)
@@ -112,7 +113,11 @@ stop_testing_system_run (void *cls,
112 "i: %u j: %u\n", 113 "i: %u j: %u\n",
113 i, 114 i,
114 j); 115 j);
115 GNUNET_HELPER_stop (helper[(i - 1) * shs->local_m + j + shs->known - 1], 116 GNUNET_HELPER_stop ((struct GNUNET_HELPER_Handle *) helper[(i - 1)
117 * shs->local_m
118 + j
119 + shs->known
120 - 1],
116 GNUNET_YES); 121 GNUNET_YES);
117 } 122 }
118 } 123 }
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 290311c59..36e9da220 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -123,9 +123,9 @@ get_command (struct GNUNET_TESTING_Interpreter *is,
123 if (GNUNET_TESTING_cmd_is_batch_ (cmd)) 123 if (GNUNET_TESTING_cmd_is_batch_ (cmd))
124 { 124 {
125#define BATCH_INDEX 1 125#define BATCH_INDEX 1
126 struct GNUNET_TESTING_Command *batch; 126 const struct GNUNET_TESTING_Command *batch;
127 struct GNUNET_TESTING_Command *current; 127 struct GNUNET_TESTING_Command *current;
128 struct GNUNET_TESTING_Command *icmd; 128 const struct GNUNET_TESTING_Command *icmd;
129 const struct GNUNET_TESTING_Command *match; 129 const struct GNUNET_TESTING_Command *match;
130 130
131 current = GNUNET_TESTING_cmd_batch_get_current_ (cmd); 131 current = GNUNET_TESTING_cmd_batch_get_current_ (cmd);