summaryrefslogtreecommitdiff
path: root/src/ats-tests/gnunet-ats-sim.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
commitf1f603c7d0b3f03dca46a4f313472288eb080eb1 (patch)
tree3a29966b02dfb83e0a8a8d5c42b3116380209fb0 /src/ats-tests/gnunet-ats-sim.c
parent53cd5b8eda2fa8db86b0907a62a39598981d008a (diff)
downloadgnunet-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.c6
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 */
58static int opt_verbose; 58static int opt_verbose;
59 59
60GNUNET_SCHEDULER_TaskIdentifier timeout_task; 60struct GNUNET_SCHEDULER_Task * timeout_task;
61 61
62struct Experiment *e; 62struct Experiment *e;
63struct LoggingHandle *l; 63struct 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);