diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
commit | 29e6158507a0758192075ac6ece7ba8e75ddc49a (patch) | |
tree | b91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/ats-tests/ats-testing-experiment.c | |
parent | 5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff) | |
download | gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.tar.gz gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.zip |
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/ats-tests/ats-testing-experiment.c')
-rw-r--r-- | src/ats-tests/ats-testing-experiment.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c index a4a925847..b8da23df9 100644 --- a/src/ats-tests/ats-testing-experiment.c +++ b/src/ats-tests/ats-testing-experiment.c | |||
@@ -415,8 +415,9 @@ load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg) | |||
415 | return e_counter; | 415 | return e_counter; |
416 | } | 416 | } |
417 | 417 | ||
418 | |||
418 | static void | 419 | static void |
419 | timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 420 | timeout_experiment (void *cls) |
420 | { | 421 | { |
421 | struct Experiment *e = cls; | 422 | struct Experiment *e = cls; |
422 | e->experiment_timeout_task = NULL; | 423 | e->experiment_timeout_task = NULL; |
@@ -432,6 +433,7 @@ timeout_experiment (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | |||
432 | GNUNET_SYSERR); | 433 | GNUNET_SYSERR); |
433 | } | 434 | } |
434 | 435 | ||
436 | |||
435 | static void | 437 | static void |
436 | enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) | 438 | enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) |
437 | { | 439 | { |
@@ -573,10 +575,12 @@ static void enforce_episode (struct Episode *ep) | |||
573 | } | 575 | } |
574 | } | 576 | } |
575 | 577 | ||
578 | |||
576 | static void | 579 | static void |
577 | timeout_episode (void *cls, const struct GNUNET_SCHEDULER_TaskContext* tc) | 580 | timeout_episode (void *cls) |
578 | { | 581 | { |
579 | struct Experiment *e = cls; | 582 | struct Experiment *e = cls; |
583 | |||
580 | e->episode_timeout_task = NULL; | 584 | e->episode_timeout_task = NULL; |
581 | if (NULL != e->ep_done_cb) | 585 | if (NULL != e->ep_done_cb) |
582 | e->ep_done_cb (e->cur); | 586 | e->ep_done_cb (e->cur); |
@@ -741,4 +745,3 @@ GNUNET_ATS_TEST_experimentation_stop (struct Experiment *e) | |||
741 | } | 745 | } |
742 | 746 | ||
743 | /* end of file ats-testing-experiment.c*/ | 747 | /* end of file ats-testing-experiment.c*/ |
744 | |||