From f1f603c7d0b3f03dca46a4f313472288eb080eb1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 24 Dec 2014 01:10:47 +0000 Subject: making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247 --- src/namestore/test_namestore_api_zone_to_name.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/namestore/test_namestore_api_zone_to_name.c') 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 @@ static struct GNUNET_NAMESTORE_Handle * nsh; -static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; +static struct GNUNET_SCHEDULER_Task * endbadly_task; static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey; @@ -81,10 +81,10 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) static void end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { - if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) + if (endbadly_task != NULL) { GNUNET_SCHEDULER_cancel (endbadly_task); - endbadly_task = GNUNET_SCHEDULER_NO_TASK; + endbadly_task = NULL; } if (privkey != NULL) GNUNET_free (privkey); -- cgit v1.2.3