diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-08 19:21:52 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-08 19:21:52 +0900 |
commit | f26345b68768695391d9a8ae983a27c03b8ce874 (patch) | |
tree | a5f757e745e9b26c00d0efeb1fbae04a791b30b6 /src/testing | |
parent | 2b48c60fde7d6a70cff7a7852f3188e3673c70bd (diff) | |
download | gnunet-f26345b68768695391d9a8ae983a27c03b8ce874.tar.gz gnunet-f26345b68768695391d9a8ae983a27c03b8ce874.zip |
-more fixmes
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing_api_cmd_barrier_reached.c | 6 | ||||
-rw-r--r-- | src/testing/testing_api_loop.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/testing/testing_api_cmd_barrier_reached.c b/src/testing/testing_api_cmd_barrier_reached.c index 43bf86398..c5b0b692e 100644 --- a/src/testing/testing_api_cmd_barrier_reached.c +++ b/src/testing/testing_api_cmd_barrier_reached.c | |||
@@ -50,7 +50,7 @@ struct BarrierReachedState | |||
50 | const char *label; | 50 | const char *label; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * The name of the barrier this commands wait (if finishing asynchronous) for or/and reaches. | 53 | * The name of the barrier this commands wait (if finishing asynchronous) for or/and reaches. |
54 | */ | 54 | */ |
55 | const char *barrier_name; | 55 | const char *barrier_name; |
56 | 56 | ||
@@ -103,6 +103,10 @@ barrier_reached_run (void *cls, | |||
103 | } | 103 | } |
104 | else if (GNUNET_NO == brs->asynchronous_finish) | 104 | else if (GNUNET_NO == brs->asynchronous_finish) |
105 | { | 105 | { |
106 | /** FIXME: This is already fishy as commands in is are an array | ||
107 | * It is unclear how this does not end up with a DLL issue. | ||
108 | * We should create a dedicated struct to hold this list. | ||
109 | */ | ||
106 | cmd = GNUNET_TESTING_interpreter_get_current_command (is); | 110 | cmd = GNUNET_TESTING_interpreter_get_current_command (is); |
107 | GNUNET_CONTAINER_DLL_insert (barrier->cmds_head, | 111 | GNUNET_CONTAINER_DLL_insert (barrier->cmds_head, |
108 | barrier->cmds_tail, | 112 | barrier->cmds_tail, |
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c index 01af7da2a..f19654029 100644 --- a/src/testing/testing_api_loop.c +++ b/src/testing/testing_api_loop.c | |||
@@ -686,6 +686,9 @@ GNUNET_TESTING_finish_attached_cmds (struct GNUNET_TESTING_Interpreter *is, | |||
686 | GNUNET_CONTAINER_DLL_remove (barrier->cmds_head, | 686 | GNUNET_CONTAINER_DLL_remove (barrier->cmds_head, |
687 | barrier->cmds_tail, | 687 | barrier->cmds_tail, |
688 | pos); | 688 | pos); |
689 | // FIXME: DANGER DANGER! "pos" is a pointer to the array(!) element in an | ||
690 | // IS. This WILL crash and burn | ||
691 | GNUNET_break (0); | ||
689 | GNUNET_free (pos); | 692 | GNUNET_free (pos); |
690 | } | 693 | } |
691 | free_barrier_node_cb_cls = GNUNET_new (struct FreeBarrierNodeCbCls); | 694 | free_barrier_node_cb_cls = GNUNET_new (struct FreeBarrierNodeCbCls); |