diff options
Diffstat (limited to 'src/transport/test_transport_plugin_cmd_simple_send_dv.c')
-rw-r--r-- | src/transport/test_transport_plugin_cmd_simple_send_dv.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_dv.c b/src/transport/test_transport_plugin_cmd_simple_send_dv.c index 6a3492705..e73e5a0b2 100644 --- a/src/transport/test_transport_plugin_cmd_simple_send_dv.c +++ b/src/transport/test_transport_plugin_cmd_simple_send_dv.c | |||
@@ -96,7 +96,7 @@ 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_log (GNUNET_ERROR_TYPE_DEBUG, | 101 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
102 | "Received test message\n"); | 102 | "Received test message\n"); |
@@ -104,9 +104,9 @@ handle_test (void *cls, | |||
104 | &ac); | 104 | &ac); |
105 | GNUNET_assert (NULL != ac); | 105 | GNUNET_assert (NULL != ac); |
106 | if (NULL == ac->cont) | 106 | if (NULL == ac->cont) |
107 | GNUNET_TESTING_async_fail (ac); | 107 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
108 | else | 108 | else |
109 | GNUNET_TESTING_async_finish (ac); | 109 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
110 | } | 110 | } |
111 | 111 | ||
112 | 112 | ||
@@ -117,7 +117,7 @@ handle_test (void *cls, | |||
117 | static void | 117 | static void |
118 | all_peers_started () | 118 | all_peers_started () |
119 | { | 119 | { |
120 | struct GNUNET_TESTING_AsyncContext *ac; | 120 | const struct GNUNET_TESTING_AsyncContext *ac; |
121 | 121 | ||
122 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 122 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
123 | "Received message\n"); | 123 | "Received message\n"); |
@@ -125,9 +125,9 @@ all_peers_started () | |||
125 | &ac); | 125 | &ac); |
126 | GNUNET_assert (NULL != ac); | 126 | GNUNET_assert (NULL != ac); |
127 | if (NULL == ac->cont) | 127 | if (NULL == ac->cont) |
128 | GNUNET_TESTING_async_fail (ac); | 128 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
129 | else | 129 | else |
130 | GNUNET_TESTING_async_finish (ac); | 130 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
131 | } | 131 | } |
132 | 132 | ||
133 | 133 | ||
@@ -170,7 +170,7 @@ static void * | |||
170 | notify_connect (struct GNUNET_TESTING_Interpreter *is, | 170 | notify_connect (struct GNUNET_TESTING_Interpreter *is, |
171 | const struct GNUNET_PeerIdentity *peer) | 171 | const struct GNUNET_PeerIdentity *peer) |
172 | { | 172 | { |
173 | struct ConnectPeersState *cps; | 173 | const struct ConnectPeersState *cps; |
174 | const struct GNUNET_TESTING_Command *cmd; | 174 | const struct GNUNET_TESTING_Command *cmd; |
175 | void *ret = NULL; | 175 | void *ret = NULL; |
176 | 176 | ||
@@ -178,12 +178,12 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
178 | "notify_connect peer %s\n", | 178 | "notify_connect peer %s\n", |
179 | GNUNET_i2s (peer)); | 179 | GNUNET_i2s (peer)); |
180 | cmd = GNUNET_TESTING_interpreter_lookup_command_all (is, | 180 | cmd = GNUNET_TESTING_interpreter_lookup_command_all (is, |
181 | "connect-peers"); | 181 | "connect-peers"); |
182 | GNUNET_TRANSPORT_get_trait_connect_peer_state (cmd, | 182 | GNUNET_TRANSPORT_get_trait_connect_peer_state (cmd, |
183 | &cps); | 183 | &cps); |
184 | cps->notify_connect (is, | 184 | cps->notify_connect (is, |
185 | peer); | 185 | peer); |
186 | 186 | ||
187 | return ret; | 187 | return ret; |
188 | } | 188 | } |
189 | 189 | ||
@@ -194,15 +194,16 @@ notify_connect (struct GNUNET_TESTING_Interpreter *is, | |||
194 | static void | 194 | static void |
195 | all_local_tests_prepared () | 195 | all_local_tests_prepared () |
196 | { | 196 | { |
197 | struct LocalPreparedState *lfs; | 197 | const struct LocalPreparedState *lfs; |
198 | 198 | ||
199 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, | 199 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, |
200 | &lfs); | 200 | &lfs); |
201 | GNUNET_assert (NULL != &lfs->ac); | 201 | GNUNET_assert (NULL != &lfs->ac); |
202 | if (NULL == lfs->ac.cont) | 202 | if (NULL == lfs->ac.cont) |
203 | GNUNET_TESTING_async_fail (&lfs->ac); | 203 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) &lfs->ac); |
204 | else | 204 | else |
205 | GNUNET_TESTING_async_finish (&lfs->ac); | 205 | GNUNET_TESTING_async_finish ((struct |
206 | GNUNET_TESTING_AsyncContext *) &lfs->ac); | ||
206 | } | 207 | } |
207 | 208 | ||
208 | 209 | ||