diff options
Diffstat (limited to 'src/cadet/test_cadet.c')
-rw-r--r-- | src/cadet/test_cadet.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c index d1b1b8212..39bfc5fed 100644 --- a/src/cadet/test_cadet.c +++ b/src/cadet/test_cadet.c | |||
@@ -262,7 +262,7 @@ show_end_data (void) | |||
262 | * @param tc Task Context. | 262 | * @param tc Task Context. |
263 | */ | 263 | */ |
264 | static void | 264 | static void |
265 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 265 | shutdown_task (void *cls) |
266 | { | 266 | { |
267 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending test.\n"); | 267 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending test.\n"); |
268 | shutdown_handle = NULL; | 268 | shutdown_handle = NULL; |
@@ -276,12 +276,13 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
276 | * @param tc Task Context. | 276 | * @param tc Task Context. |
277 | */ | 277 | */ |
278 | static void | 278 | static void |
279 | disconnect_cadet_peers (void *cls, | 279 | disconnect_cadet_peers (void *cls) |
280 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
281 | { | 280 | { |
282 | long line = (long) cls; | 281 | long line = (long) cls; |
283 | unsigned int i; | 282 | unsigned int i; |
283 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
284 | 284 | ||
285 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
285 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 286 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 287 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
287 | "disconnecting cadet peers due to SHUTDOWN! called from %ld\n", | 288 | "disconnecting cadet peers due to SHUTDOWN! called from %ld\n", |
@@ -387,16 +388,16 @@ stats_iterator (void *cls, const struct GNUNET_TESTBED_Peer *peer, | |||
387 | * Task to gather all statistics. | 388 | * Task to gather all statistics. |
388 | * | 389 | * |
389 | * @param cls Closure (NULL). | 390 | * @param cls Closure (NULL). |
390 | * @param tc Task Context. | ||
391 | */ | 391 | */ |
392 | static void | 392 | static void |
393 | gather_stats_and_exit (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 393 | gather_stats_and_exit (void *cls) |
394 | { | 394 | { |
395 | disconnect_task = NULL; | ||
396 | long l = (long) cls; | 395 | long l = (long) cls; |
396 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
397 | 397 | ||
398 | disconnect_task = NULL; | ||
398 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "gathering statistics from line %d\n", l); | 399 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "gathering statistics from line %d\n", l); |
399 | 400 | tc = GNUNET_SCHEDULER_get_task_context (); | |
400 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 401 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
401 | { | 402 | { |
402 | disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, | 403 | disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_cadet_peers, |
@@ -456,18 +457,17 @@ tmt_rdy (void *cls, size_t size, void *buf); | |||
456 | * Task to request a new data transmission. | 457 | * Task to request a new data transmission. |
457 | * | 458 | * |
458 | * @param cls Closure (peer #). | 459 | * @param cls Closure (peer #). |
459 | * @param tc Task Context. | ||
460 | */ | 460 | */ |
461 | static void | 461 | static void |
462 | data_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 462 | data_task (void *cls) |
463 | { | 463 | { |
464 | struct GNUNET_CADET_Channel *channel; | 464 | struct GNUNET_CADET_Channel *channel; |
465 | static struct GNUNET_CADET_TransmitHandle **pth; | 465 | static struct GNUNET_CADET_TransmitHandle **pth; |
466 | 466 | const struct GNUNET_SCHEDULER_TaskContext *tc; | |
467 | long src; | 467 | long src; |
468 | 468 | ||
469 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Data task\n"); | 469 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Data task\n"); |
470 | 470 | tc = GNUNET_SCHEDULER_get_task_context (); | |
471 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 471 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
472 | return; | 472 | return; |
473 | 473 | ||
@@ -837,13 +837,14 @@ channel_cleaner (void *cls, const struct GNUNET_CADET_Channel *channel, | |||
837 | * on callback function ch. | 837 | * on callback function ch. |
838 | * | 838 | * |
839 | * @param cls Closure (unused). | 839 | * @param cls Closure (unused). |
840 | * @param tc Task Context. | ||
841 | */ | 840 | */ |
842 | static void | 841 | static void |
843 | do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 842 | do_test (void *cls) |
844 | { | 843 | { |
845 | enum GNUNET_CADET_ChannelOption flags; | 844 | enum GNUNET_CADET_ChannelOption flags; |
845 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
846 | 846 | ||
847 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
847 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) | 848 | if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) != 0) |
848 | return; | 849 | return; |
849 | 850 | ||
@@ -1084,4 +1085,3 @@ main (int argc, char *argv[]) | |||
1084 | } | 1085 | } |
1085 | 1086 | ||
1086 | /* end of test_cadet.c */ | 1087 | /* end of test_cadet.c */ |
1087 | |||