aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_monitoring_existing.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/namestore/test_namestore_api_monitoring_existing.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/namestore/test_namestore_api_monitoring_existing.c')
-rw-r--r--src/namestore/test_namestore_api_monitoring_existing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c
index ae922d30e..a02860c86 100644
--- a/src/namestore/test_namestore_api_monitoring_existing.c
+++ b/src/namestore/test_namestore_api_monitoring_existing.c
@@ -33,7 +33,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg;
33 33
34static struct GNUNET_NAMESTORE_Handle * nsh; 34static struct GNUNET_NAMESTORE_Handle * nsh;
35 35
36static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 36static struct GNUNET_SCHEDULER_Task * endbadly_task;
37 37
38static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; 38static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
39 39
@@ -194,10 +194,10 @@ zone_proc (void *cls,
194 194
195 if (2 == ++returned_records) 195 if (2 == ++returned_records)
196 { 196 {
197 if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) 197 if (endbadly_task != NULL)
198 { 198 {
199 GNUNET_SCHEDULER_cancel (endbadly_task); 199 GNUNET_SCHEDULER_cancel (endbadly_task);
200 endbadly_task = GNUNET_SCHEDULER_NO_TASK; 200 endbadly_task = NULL;
201 } 201 }
202 if (GNUNET_YES == fail) 202 if (GNUNET_YES == fail)
203 GNUNET_SCHEDULER_add_now (&endbadly, NULL); 203 GNUNET_SCHEDULER_add_now (&endbadly, NULL);