aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_lookup_nick.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_lookup_nick.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_lookup_nick.c')
-rw-r--r--src/namestore/test_namestore_api_lookup_nick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c
index 2a3933e79..1f7647ca5 100644
--- a/src/namestore/test_namestore_api_lookup_nick.c
+++ b/src/namestore/test_namestore_api_lookup_nick.c
@@ -37,7 +37,7 @@
37 37
38static struct GNUNET_NAMESTORE_Handle *nsh; 38static struct GNUNET_NAMESTORE_Handle *nsh;
39 39
40static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 40static struct GNUNET_SCHEDULER_Task * endbadly_task;
41 41
42static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; 42static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
43 43
@@ -206,14 +206,14 @@ void lookup_it (void *cls,
206 if ((GNUNET_YES == found_nick) && (GNUNET_YES == found_record)) 206 if ((GNUNET_YES == found_nick) && (GNUNET_YES == found_record))
207 { 207 {
208 GNUNET_SCHEDULER_cancel (endbadly_task); 208 GNUNET_SCHEDULER_cancel (endbadly_task);
209 endbadly_task = GNUNET_SCHEDULER_NO_TASK; 209 endbadly_task = NULL;
210 GNUNET_SCHEDULER_add_now (&end, NULL ); 210 GNUNET_SCHEDULER_add_now (&end, NULL );
211 } 211 }
212 else 212 else
213 { 213 {
214 GNUNET_break (0); 214 GNUNET_break (0);
215 GNUNET_SCHEDULER_cancel (endbadly_task); 215 GNUNET_SCHEDULER_cancel (endbadly_task);
216 endbadly_task = GNUNET_SCHEDULER_NO_TASK; 216 endbadly_task = NULL;
217 GNUNET_SCHEDULER_add_now (&endbadly, NULL ); 217 GNUNET_SCHEDULER_add_now (&endbadly, NULL );
218 } 218 }
219} 219}