diff options
Diffstat (limited to 'src/transport/test_transport_plugin_cmd_simple_send_broadcast.c')
-rw-r--r-- | src/transport/test_transport_plugin_cmd_simple_send_broadcast.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c b/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c index 526f08e6a..9d6844be1 100644 --- a/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c +++ b/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c | |||
@@ -96,15 +96,15 @@ static void | |||
96 | handle_test (void *cls, | 96 | handle_test (void *cls, |
97 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) | 97 | const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) |
98 | { | 98 | { |
99 | struct GNUNET_TESTING_AsyncContext *ac; | 99 | const struct GNUNET_TESTING_AsyncContext *ac; |
100 | 100 | ||
101 | GNUNET_TESTING_get_trait_async_context (&block_receive, | 101 | GNUNET_TESTING_get_trait_async_context (&block_receive, |
102 | &ac); | 102 | &ac); |
103 | GNUNET_assert (NULL != ac); | 103 | GNUNET_assert (NULL != ac); |
104 | if (NULL == ac->cont) | 104 | if ((GNUNET_NO == ac->finished) && (NULL == ac->cont)) |
105 | GNUNET_TESTING_async_fail (ac); | 105 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
106 | else | 106 | else if (GNUNET_NO == ac->finished) |
107 | GNUNET_TESTING_async_finish (ac); | 107 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
108 | } | 108 | } |
109 | 109 | ||
110 | 110 | ||
@@ -115,7 +115,7 @@ handle_test (void *cls, | |||
115 | static void | 115 | static void |
116 | all_peers_started () | 116 | all_peers_started () |
117 | { | 117 | { |
118 | struct GNUNET_TESTING_AsyncContext *ac; | 118 | const struct GNUNET_TESTING_AsyncContext *ac; |
119 | 119 | ||
120 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 120 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
121 | "Received message\n"); | 121 | "Received message\n"); |
@@ -123,9 +123,9 @@ all_peers_started () | |||
123 | &ac); | 123 | &ac); |
124 | GNUNET_assert (NULL != ac); | 124 | GNUNET_assert (NULL != ac); |
125 | if (NULL == ac->cont) | 125 | if (NULL == ac->cont) |
126 | GNUNET_TESTING_async_fail (ac); | 126 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
127 | else | 127 | else |
128 | GNUNET_TESTING_async_finish (ac); | 128 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
129 | } | 129 | } |
130 | 130 | ||
131 | 131 | ||
@@ -168,7 +168,7 @@ static void * | |||
168 | notify_connect (struct GNUNET_TESTING_Interpreter *is, | 168 | notify_connect (struct GNUNET_TESTING_Interpreter *is, |
169 | const struct GNUNET_PeerIdentity *peer) | 169 | const struct GNUNET_PeerIdentity *peer) |
170 | { | 170 | { |
171 | struct GNUNET_TESTING_AsyncContext *ac; | 171 | const struct GNUNET_TESTING_AsyncContext *ac; |
172 | void *ret = NULL; | 172 | void *ret = NULL; |
173 | const struct GNUNET_TESTING_Command *cmd; | 173 | const struct GNUNET_TESTING_Command *cmd; |
174 | struct BlockState *bs; | 174 | struct BlockState *bs; |
@@ -186,9 +186,9 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
186 | "notify_connect running\n"); | 186 | "notify_connect running\n"); |
187 | GNUNET_assert (NULL != ac); | 187 | GNUNET_assert (NULL != ac); |
188 | if (NULL == ac->cont) | 188 | if (NULL == ac->cont) |
189 | GNUNET_TESTING_async_fail (ac); | 189 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
190 | else | 190 | else |
191 | GNUNET_TESTING_async_finish (ac); | 191 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
192 | } | 192 | } |
193 | else | 193 | else |
194 | { | 194 | { |
@@ -198,7 +198,9 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
198 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 198 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
199 | "block state %s\n", | 199 | "block state %s\n", |
200 | cmd->label); | 200 | cmd->label); |
201 | GNUNET_TESTING_get_trait_block_state (cmd,&bs); | 201 | GNUNET_TESTING_get_trait_block_state ( |
202 | cmd, | ||
203 | (const struct BlockState **) &bs); | ||
202 | 204 | ||
203 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 205 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
204 | "block state %u\n", | 206 | "block state %u\n", |
@@ -219,15 +221,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
219 | static void | 221 | static void |
220 | all_local_tests_prepared () | 222 | all_local_tests_prepared () |
221 | { | 223 | { |
222 | struct LocalPreparedState *lfs; | 224 | const struct LocalPreparedState *lfs; |
223 | 225 | ||
224 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, | 226 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, |
225 | &lfs); | 227 | &lfs); |
226 | GNUNET_assert (NULL != &lfs->ac); | 228 | GNUNET_assert (NULL != &lfs->ac); |
227 | if (NULL == lfs->ac.cont) | 229 | if (NULL == lfs->ac.cont) |
228 | GNUNET_TESTING_async_fail (&lfs->ac); | 230 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) &lfs->ac); |
229 | else | 231 | else |
230 | GNUNET_TESTING_async_finish (&lfs->ac); | 232 | GNUNET_TESTING_async_finish ((struct |
233 | GNUNET_TESTING_AsyncContext *) &lfs->ac); | ||
231 | } | 234 | } |
232 | 235 | ||
233 | 236 | ||