aboutsummaryrefslogtreecommitdiff
path: root/src/nse/test_nse_api.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/nse/test_nse_api.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/nse/test_nse_api.c')
-rw-r--r--src/nse/test_nse_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nse/test_nse_api.c b/src/nse/test_nse_api.c
index 324d4ff16..5eff16c79 100644
--- a/src/nse/test_nse_api.c
+++ b/src/nse/test_nse_api.c
@@ -29,7 +29,7 @@
29 29
30static struct GNUNET_NSE_Handle *h; 30static struct GNUNET_NSE_Handle *h;
31 31
32static GNUNET_SCHEDULER_TaskIdentifier die_task; 32static struct GNUNET_SCHEDULER_Task * die_task;
33 33
34 34
35/** 35/**
@@ -69,7 +69,7 @@ check_nse_message (void *cls, struct GNUNET_TIME_Absolute timestamp,
69 estimate, std_dev); 69 estimate, std_dev);
70 /* Fantastic check below. Expect NaN, the only thing not equal to itself. */ 70 /* Fantastic check below. Expect NaN, the only thing not equal to itself. */
71 (*ok) = 0; 71 (*ok) = 0;
72 if (die_task != GNUNET_SCHEDULER_NO_TASK) 72 if (die_task != NULL)
73 GNUNET_SCHEDULER_cancel (die_task); 73 GNUNET_SCHEDULER_cancel (die_task);
74 die_task = GNUNET_SCHEDULER_add_now (&end_test, NULL); 74 die_task = GNUNET_SCHEDULER_add_now (&end_test, NULL);
75} 75}