diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-24 01:10:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-24 01:10:47 +0000 |
commit | f1f603c7d0b3f03dca46a4f313472288eb080eb1 (patch) | |
tree | 3a29966b02dfb83e0a8a8d5c42b3116380209fb0 /src/ats/test_ats_solver_convergence.c | |
parent | 53cd5b8eda2fa8db86b0907a62a39598981d008a (diff) | |
download | gnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.tar.gz gnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.zip |
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/ats/test_ats_solver_convergence.c')
-rw-r--r-- | src/ats/test_ats_solver_convergence.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ats/test_ats_solver_convergence.c b/src/ats/test_ats_solver_convergence.c index b99cab809..aa8704ccf 100644 --- a/src/ats/test_ats_solver_convergence.c +++ b/src/ats/test_ats_solver_convergence.c | |||
@@ -33,7 +33,7 @@ | |||
33 | /** | 33 | /** |
34 | * Timeout task | 34 | * Timeout task |
35 | */ | 35 | */ |
36 | static GNUNET_SCHEDULER_TaskIdentifier end_task; | 36 | static struct GNUNET_SCHEDULER_Task * end_task; |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * Statistics handle | 39 | * Statistics handle |
@@ -113,10 +113,10 @@ static void | |||
113 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 113 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
114 | { | 114 | { |
115 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n"); | 115 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Done!\n"); |
116 | if (end_task == GNUNET_SCHEDULER_NO_TASK) | 116 | if (end_task == NULL) |
117 | { | 117 | { |
118 | GNUNET_SCHEDULER_cancel (end_task); | 118 | GNUNET_SCHEDULER_cancel (end_task); |
119 | end_task = GNUNET_SCHEDULER_NO_TASK; | 119 | end_task = NULL; |
120 | } | 120 | } |
121 | 121 | ||
122 | if (NULL != sched_ats) | 122 | if (NULL != sched_ats) |