aboutsummaryrefslogtreecommitdiff
path: root/src/regex/gnunet-daemon-regexprofiler.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/regex/gnunet-daemon-regexprofiler.c
parent53cd5b8eda2fa8db86b0907a62a39598981d008a (diff)
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/regex/gnunet-daemon-regexprofiler.c')
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index 3d6624cb8f..6831a850c5 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -62,7 +62,7 @@ static struct REGEX_INTERNAL_Announcement *announce_handle;
/**
* Periodically reannounce regex.
*/
-static GNUNET_SCHEDULER_TaskIdentifier reannounce_task;
+static struct GNUNET_SCHEDULER_Task * reannounce_task;
/**
* What's the maximum reannounce period.
@@ -145,7 +145,7 @@ reannounce_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
struct GNUNET_TIME_Relative random_delay;
char *regex = cls;
- reannounce_task = GNUNET_SCHEDULER_NO_TASK;
+ reannounce_task = NULL;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
{
GNUNET_free (regex);
@@ -208,7 +208,7 @@ announce_regex (const char * regex)
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Daemon for %s starting\n",
policy_filename);
- GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == reannounce_task);
+ GNUNET_assert (NULL == reannounce_task);
copy = GNUNET_strdup (regex);
reannounce_task = GNUNET_SCHEDULER_add_now (reannounce_regex, (void *) copy);
}