aboutsummaryrefslogtreecommitdiff
path: root/src/regex/test_regex_api.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/test_regex_api.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/regex/test_regex_api.c')
-rw-r--r--src/regex/test_regex_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regex/test_regex_api.c b/src/regex/test_regex_api.c
index a35934c9c..1603d19fa 100644
--- a/src/regex/test_regex_api.c
+++ b/src/regex/test_regex_api.c
@@ -45,14 +45,14 @@ static struct GNUNET_REGEX_Search *s;
45 45
46static int ok = 1; 46static int ok = 1;
47 47
48static GNUNET_SCHEDULER_TaskIdentifier die_task; 48static struct GNUNET_SCHEDULER_Task * die_task;
49 49
50 50
51static void 51static void
52end (void *cls, 52end (void *cls,
53 const struct GNUNET_SCHEDULER_TaskContext *tc) 53 const struct GNUNET_SCHEDULER_TaskContext *tc)
54{ 54{
55 die_task = GNUNET_SCHEDULER_NO_TASK; 55 die_task = NULL;
56 GNUNET_REGEX_announce_cancel (a); 56 GNUNET_REGEX_announce_cancel (a);
57 a = NULL; 57 a = NULL;
58 GNUNET_REGEX_search_cancel (s); 58 GNUNET_REGEX_search_cancel (s);
@@ -64,7 +64,7 @@ end (void *cls,
64static void 64static void
65end_badly () 65end_badly ()
66{ 66{
67 die_task = GNUNET_SCHEDULER_NO_TASK; 67 die_task = NULL;
68 FPRINTF (stderr, "%s", "Testcase failed (timeout).\n"); 68 FPRINTF (stderr, "%s", "Testcase failed (timeout).\n");
69 GNUNET_REGEX_announce_cancel (a); 69 GNUNET_REGEX_announce_cancel (a);
70 a = NULL; 70 a = NULL;