diff options
Diffstat (limited to 'src/testing/test_testing_topology_churn.c')
-rw-r--r-- | src/testing/test_testing_topology_churn.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/src/testing/test_testing_topology_churn.c b/src/testing/test_testing_topology_churn.c index ee800c52c..5a348642c 100644 --- a/src/testing/test_testing_topology_churn.c +++ b/src/testing/test_testing_topology_churn.c | |||
@@ -198,8 +198,7 @@ churn_peers_off () | |||
198 | } | 198 | } |
199 | 199 | ||
200 | static void | 200 | static void |
201 | peers_started_callback (void *cls, | 201 | peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, |
202 | const struct GNUNET_PeerIdentity *id, | ||
203 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 202 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
204 | struct GNUNET_TESTING_Daemon *d, const char *emsg) | 203 | struct GNUNET_TESTING_Daemon *d, const char *emsg) |
205 | { | 204 | { |
@@ -224,10 +223,10 @@ peers_started_callback (void *cls, | |||
224 | GNUNET_SCHEDULER_cancel (die_task); | 223 | GNUNET_SCHEDULER_cancel (die_task); |
225 | /* Set up task in case topology creation doesn't finish | 224 | /* Set up task in case topology creation doesn't finish |
226 | * within a reasonable amount of time */ | 225 | * within a reasonable amount of time */ |
227 | die_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 226 | die_task = |
228 | (GNUNET_TIME_UNIT_MINUTES, 5), | 227 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
229 | &end_badly, | 228 | (GNUNET_TIME_UNIT_MINUTES, 5), &end_badly, |
230 | "from peers_started_callback"); | 229 | "from peers_started_callback"); |
231 | churn_peers_off (); | 230 | churn_peers_off (); |
232 | ok = 0; | 231 | ok = 0; |
233 | } | 232 | } |
@@ -235,9 +234,8 @@ peers_started_callback (void *cls, | |||
235 | 234 | ||
236 | 235 | ||
237 | static void | 236 | static void |
238 | run (void *cls, | 237 | run (void *cls, char *const *args, const char *cfgfile, |
239 | char *const *args, | 238 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
240 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
241 | { | 239 | { |
242 | ok = 1; | 240 | ok = 1; |
243 | 241 | ||
@@ -274,18 +272,15 @@ run (void *cls, | |||
274 | 272 | ||
275 | 273 | ||
276 | /* Set up a task to end testing if peer start fails */ | 274 | /* Set up a task to end testing if peer start fails */ |
277 | die_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 275 | die_task = |
278 | (GNUNET_TIME_UNIT_MINUTES, 5), | 276 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
279 | &end_badly, | 277 | (GNUNET_TIME_UNIT_MINUTES, 5), &end_badly, |
280 | "didn't start all daemons in reasonable amount of time!!!"); | 278 | "didn't start all daemons in reasonable amount of time!!!"); |
281 | 279 | ||
282 | pg = GNUNET_TESTING_daemons_start (cfg, | 280 | pg = GNUNET_TESTING_daemons_start (cfg, peers_left, peers_left, peers_left, |
283 | peers_left, | ||
284 | peers_left, | ||
285 | peers_left, | ||
286 | TIMEOUT, NULL, NULL, | 281 | TIMEOUT, NULL, NULL, |
287 | &peers_started_callback, NULL, NULL, | 282 | &peers_started_callback, NULL, NULL, NULL, |
288 | NULL, NULL); | 283 | NULL); |
289 | 284 | ||
290 | } | 285 | } |
291 | 286 | ||
@@ -305,9 +300,10 @@ check () | |||
305 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 300 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
306 | GNUNET_GETOPT_OPTION_END | 301 | GNUNET_GETOPT_OPTION_END |
307 | }; | 302 | }; |
308 | ret = GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, | 303 | ret = |
309 | argv, "test-testing-topology-churn", "nohelp", | 304 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, |
310 | options, &run, &ok); | 305 | "test-testing-topology-churn", "nohelp", options, |
306 | &run, &ok); | ||
311 | if (ret != GNUNET_OK) | 307 | if (ret != GNUNET_OK) |
312 | { | 308 | { |
313 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 309 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |