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-tests/gnunet-ats-sim.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-tests/gnunet-ats-sim.c')
-rw-r--r-- | src/ats-tests/gnunet-ats-sim.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c index 0659af05d..10a85702f 100644 --- a/src/ats-tests/gnunet-ats-sim.c +++ b/src/ats-tests/gnunet-ats-sim.c | |||
@@ -57,7 +57,7 @@ static int opt_plot; | |||
57 | */ | 57 | */ |
58 | static int opt_verbose; | 58 | static int opt_verbose; |
59 | 59 | ||
60 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 60 | struct GNUNET_SCHEDULER_Task * timeout_task; |
61 | 61 | ||
62 | struct Experiment *e; | 62 | struct Experiment *e; |
63 | struct LoggingHandle *l; | 63 | struct LoggingHandle *l; |
@@ -183,10 +183,10 @@ experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration,i | |||
183 | GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES)); | 183 | GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES)); |
184 | else | 184 | else |
185 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Experiment failed \n"); | 185 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Experiment failed \n"); |
186 | if (GNUNET_SCHEDULER_NO_TASK != timeout_task) | 186 | if (NULL != timeout_task) |
187 | { | 187 | { |
188 | GNUNET_SCHEDULER_cancel (timeout_task); | 188 | GNUNET_SCHEDULER_cancel (timeout_task); |
189 | timeout_task = GNUNET_SCHEDULER_NO_TASK; | 189 | timeout_task = NULL; |
190 | } | 190 | } |
191 | /* Stop logging */ | 191 | /* Stop logging */ |
192 | GNUNET_ATS_TEST_logging_stop (l); | 192 | GNUNET_ATS_TEST_logging_stop (l); |