aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_block_until_external_trigger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_block_until_external_trigger.c')
-rw-r--r--src/testing/testing_api_cmd_block_until_external_trigger.c48
1 files changed, 2 insertions, 46 deletions
diff --git a/src/testing/testing_api_cmd_block_until_external_trigger.c b/src/testing/testing_api_cmd_block_until_external_trigger.c
index 9360dd02e..f51b2109b 100644
--- a/src/testing/testing_api_cmd_block_until_external_trigger.c
+++ b/src/testing/testing_api_cmd_block_until_external_trigger.c
@@ -55,16 +55,8 @@ block_until_external_trigger_traits (void *cls,
55 struct BlockState *bs = cls; 55 struct BlockState *bs = cls;
56 struct GNUNET_TESTING_AsyncContext *ac = &bs->ac; 56 struct GNUNET_TESTING_AsyncContext *ac = &bs->ac;
57 struct GNUNET_TESTING_Trait traits[] = { 57 struct GNUNET_TESTING_Trait traits[] = {
58 { 58 GNUNET_TESTING_make_trait_async_context ((const void *) ac),
59 .index = 0, 59 GNUNET_TESTING_make_trait_block_state ((const void *) bs),
60 .trait_name = "async_context",
61 .ptr = (const void *) ac,
62 },
63 {
64 .index = 1,
65 .trait_name = "block_state",
66 .ptr = (const void *) bs,
67 },
68 GNUNET_TESTING_trait_end () 60 GNUNET_TESTING_trait_end ()
69 }; 61 };
70 62
@@ -76,42 +68,6 @@ block_until_external_trigger_traits (void *cls,
76 68
77 69
78/** 70/**
79 * Function to get the trait with the internal command state BlockState.
80 *
81 * * @param[out] ac struct BlockState.
82* @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise.
83 */
84int
85GNUNET_TESTING_get_trait_block_state (
86 const struct GNUNET_TESTING_Command *cmd,
87 struct BlockState **bs)
88{
89 return cmd->traits (cmd->cls,
90 (const void **) bs,
91 "block_state",
92 (unsigned int) 1);
93}
94
95
96/**
97 * Function to get the trait with the async context.
98 *
99 * @param[out] ac struct GNUNET_TESTING_AsyncContext.
100 * @return #GNUNET_OK if no error occurred, #GNUNET_SYSERR otherwise.
101 */
102int
103GNUNET_TESTING_get_trait_async_context (
104 const struct GNUNET_TESTING_Command *cmd,
105 struct GNUNET_TESTING_AsyncContext **ac)
106{
107 return cmd->traits (cmd->cls,
108 (const void **) ac,
109 "async_context",
110 (unsigned int) 0);
111}
112
113
114/**
115 * This function does nothing but to start the cmd. 71 * This function does nothing but to start the cmd.
116 * 72 *
117 */ 73 */