diff options
author | t3sserakt <t3ss@posteo.de> | 2022-12-13 13:08:17 +0100 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2022-12-13 13:08:17 +0100 |
commit | ba4d141be09651b452270fc21f062d50bd3f738a (patch) | |
tree | 309c149fc8989fc83a893703e4f86194fb9a2f36 /src/testing/gnunet-cmds-helper.c | |
parent | 52d0d09146c1d13bded8195cb91845acac1b355d (diff) | |
download | gnunet-ba4d141be09651b452270fc21f062d50bd3f738a.tar.gz gnunet-ba4d141be09651b452270fc21f062d50bd3f738a.zip |
- refactored barrier header, fixed messages for barrier signaling
Diffstat (limited to 'src/testing/gnunet-cmds-helper.c')
-rw-r--r-- | src/testing/gnunet-cmds-helper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/testing/gnunet-cmds-helper.c b/src/testing/gnunet-cmds-helper.c index 9c16038f0..22cf5a428 100644 --- a/src/testing/gnunet-cmds-helper.c +++ b/src/testing/gnunet-cmds-helper.c | |||
@@ -67,6 +67,8 @@ | |||
67 | 67 | ||
68 | struct GNUNET_SCHEDULER_Task *finished_task; | 68 | struct GNUNET_SCHEDULER_Task *finished_task; |
69 | 69 | ||
70 | struct GNUNET_TESTING_Interpreter *is; | ||
71 | |||
70 | /** | 72 | /** |
71 | * Struct with information about a specific node and the whole network namespace setup. | 73 | * Struct with information about a specific node and the whole network namespace setup. |
72 | * | 74 | * |
@@ -392,7 +394,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
392 | } | 394 | } |
393 | strcat (node_ip, plugin->m); | 395 | strcat (node_ip, plugin->m); |
394 | 396 | ||
395 | plugin->api->start_testcase (&write_message, router_ip, node_ip, plugin->m, | 397 | is = plugin->api->start_testcase (&write_message, router_ip, node_ip, plugin->m, |
396 | 398 | ||
397 | plugin->n, plugin->local_m, ni->topology_data, | 399 | plugin->n, plugin->local_m, ni->topology_data, |
398 | ni->read_file, &finished_cb); | 400 | ni->read_file, &finished_cb); |
@@ -413,9 +415,11 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
413 | else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_ADVANCED == ntohs ( | 415 | else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_BARRIER_ADVANCED == ntohs ( |
414 | message->type)) | 416 | message->type)) |
415 | { | 417 | { |
418 | const char *barrier_name; | ||
416 | struct GNUNET_TESTING_CommandBarrierAdvanced *adm = (struct GNUNET_TESTING_CommandBarrierAdvanced *) message; | 419 | struct GNUNET_TESTING_CommandBarrierAdvanced *adm = (struct GNUNET_TESTING_CommandBarrierAdvanced *) message; |
417 | 420 | ||
418 | plugin->api->barrier_advanced (adm->barrier_name); | 421 | barrier_name = (const char *) &adm[1]; |
422 | GNUNET_TESTING_finish_attached_cmds (is, barrier_name); | ||
419 | return GNUNET_OK; | 423 | return GNUNET_OK; |
420 | } | 424 | } |
421 | else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED == ntohs ( | 425 | else if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED == ntohs ( |