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/namestore/test_namestore_api_zone_to_name.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/namestore/test_namestore_api_zone_to_name.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_to_name.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index 9ade0cfc1..5c75fcb91 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | static struct GNUNET_NAMESTORE_Handle * nsh; | 40 | static struct GNUNET_NAMESTORE_Handle * nsh; |
41 | 41 | ||
42 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 42 | static struct GNUNET_SCHEDULER_Task * endbadly_task; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; | 44 | static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; |
45 | 45 | ||
@@ -81,10 +81,10 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
81 | static void | 81 | static void |
82 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 82 | end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
83 | { | 83 | { |
84 | if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) | 84 | if (endbadly_task != NULL) |
85 | { | 85 | { |
86 | GNUNET_SCHEDULER_cancel (endbadly_task); | 86 | GNUNET_SCHEDULER_cancel (endbadly_task); |
87 | endbadly_task = GNUNET_SCHEDULER_NO_TASK; | 87 | endbadly_task = NULL; |
88 | } | 88 | } |
89 | if (privkey != NULL) | 89 | if (privkey != NULL) |
90 | GNUNET_free (privkey); | 90 | GNUNET_free (privkey); |