diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-08-15 21:41:31 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-08-15 21:42:52 +0200 |
commit | ecfbd79c029090dfbc657194adae2d229273fb9d (patch) | |
tree | ecf018cabed401aad699e7cfeaf1e6f9050dd95e /src/include | |
parent | 3c5eb7a406b3b0d2b47c00eabbff7a3984ce3429 (diff) | |
download | gnunet-ecfbd79c029090dfbc657194adae2d229273fb9d.tar.gz gnunet-ecfbd79c029090dfbc657194adae2d229273fb9d.zip |
-minor bugfixes, adding FIXMEs
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_testing_netjail_lib.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_testing_ng_lib.h | 19 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/include/gnunet_testing_netjail_lib.h b/src/include/gnunet_testing_netjail_lib.h index 106d7cdae..1d6f114eb 100644 --- a/src/include/gnunet_testing_netjail_lib.h +++ b/src/include/gnunet_testing_netjail_lib.h | |||
@@ -515,10 +515,10 @@ GNUNET_TESTING_cmd_local_test_prepared (const char *label, | |||
515 | */ | 515 | */ |
516 | #define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op) \ | 516 | #define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op) \ |
517 | op (test_system, const struct GNUNET_TESTING_System) \ | 517 | op (test_system, const struct GNUNET_TESTING_System) \ |
518 | op (async_context, const struct GNUNET_TESTING_AsyncContext) \ | 518 | op (async_context, struct GNUNET_TESTING_AsyncContext) \ |
519 | op (helper_handles, const struct GNUNET_HELPER_Handle *) \ | 519 | op (helper_handles, const struct GNUNET_HELPER_Handle *) \ |
520 | op (local_prepared_state, const struct GNUNET_TESTING_LocalPreparedState) \ | 520 | op (local_prepared_state, const struct GNUNET_TESTING_LocalPreparedState) \ |
521 | op (block_state, const struct GNUNET_TESTING_BlockState) | 521 | op (block_state, struct GNUNET_TESTING_BlockState) |
522 | 522 | ||
523 | GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS (GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT) | 523 | GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS (GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT) |
524 | 524 | ||
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h index 71d352643..5c9079fdf 100644 --- a/src/include/gnunet_testing_ng_lib.h +++ b/src/include/gnunet_testing_ng_lib.h | |||
@@ -70,7 +70,7 @@ struct GNUNET_TESTING_AsyncContext | |||
70 | /** | 70 | /** |
71 | * Interpreter we are part of. | 71 | * Interpreter we are part of. |
72 | */ | 72 | */ |
73 | struct GNUNET_TESTING_Interpreter *is; | 73 | struct GNUNET_TESTING_Interpreter *is; // Why needed? When available? |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Function to call when done. | 76 | * Function to call when done. |
@@ -90,14 +90,17 @@ struct GNUNET_TESTING_AsyncContext | |||
90 | enum GNUNET_GenericReturnValue finished; | 90 | enum GNUNET_GenericReturnValue finished; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | |||
93 | typedef void | 94 | typedef void |
94 | (*GNUNET_TESTING_CommandRunRoutine)(void *cls, | 95 | (*GNUNET_TESTING_CommandRunRoutine)(void *cls, |
95 | struct GNUNET_TESTING_Interpreter *is); | 96 | struct GNUNET_TESTING_Interpreter *is); |
96 | 97 | ||
98 | |||
97 | typedef void | 99 | typedef void |
98 | (*GNUNET_TESTING_CommandCleanupRoutine)(void *cls); | 100 | (*GNUNET_TESTING_CommandCleanupRoutine)(void *cls); |
99 | 101 | ||
100 | typedef enum GNUNET_GenericReturnValue | 102 | |
103 | typedef enum GNUNET_GenericReturnValue | ||
101 | (*GNUNET_TESTING_CommandGetTraits) (void *cls, | 104 | (*GNUNET_TESTING_CommandGetTraits) (void *cls, |
102 | const void **ret, | 105 | const void **ret, |
103 | const char *trait, | 106 | const char *trait, |
@@ -240,6 +243,7 @@ struct GNUNET_TESTING_Command | |||
240 | * @param label label of the command to lookup. | 243 | * @param label label of the command to lookup. |
241 | * @return the command, if it is found, or NULL. | 244 | * @return the command, if it is found, or NULL. |
242 | */ | 245 | */ |
246 | // FIXME: think harder about whether this is actually needed, likely not. | ||
243 | const struct GNUNET_TESTING_Command * | 247 | const struct GNUNET_TESTING_Command * |
244 | GNUNET_TESTING_interpreter_lookup_future_command ( | 248 | GNUNET_TESTING_interpreter_lookup_future_command ( |
245 | struct GNUNET_TESTING_Interpreter *is, | 249 | struct GNUNET_TESTING_Interpreter *is, |
@@ -321,10 +325,13 @@ GNUNET_TESTING_cmd_end (void); | |||
321 | 325 | ||
322 | 326 | ||
323 | /** | 327 | /** |
324 | * Turn asynchronous command into non blocking command by setting asynchronous_finish to true. | 328 | * Turn asynchronous command into non blocking command by setting |
325 | * FIXME: what is this API doing? Is it returning a new cmd which is unblocking? | 329 | * asynchronous_finish to true. Modifies (and then returns) @a cmd simply |
326 | * Is it modifying cmd? | 330 | * setting the bit. By default, most commands are blocking, and by wrapping |
327 | * Looking at the code, it both modifying cmd AND returning a copy oO | 331 | * the command construction in this function a blocking command can be turned |
332 | * into an asynchronous command where the interpreter continues after | ||
333 | * initiating the asynchronous action. Does nothing if the command is | ||
334 | * fundamentally synchronous. | ||
328 | * | 335 | * |
329 | * @param cmd command to make synchronous. | 336 | * @param cmd command to make synchronous. |
330 | * @return a finish-command. | 337 | * @return a finish-command. |