summaryrefslogtreecommitdiff
path: root/src/transport/transport-testing.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/transport/transport-testing.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/transport/transport-testing.c')
-rw-r--r--src/transport/transport-testing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index d25d3f4b7..517daf82a 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -193,7 +193,7 @@ try_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
struct PeerContext *p1 = cc->p1;
struct PeerContext *p2 = cc->p2;
- cc->tct = GNUNET_SCHEDULER_NO_TASK;
+ cc->tct = NULL;
if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
@@ -534,9 +534,9 @@ GNUNET_TRANSPORT_TESTING_connect_peers_cancel (struct
"Canceling connect request %p!\n",
cc);
- if (cc->tct != GNUNET_SCHEDULER_NO_TASK)
+ if (cc->tct != NULL)
GNUNET_SCHEDULER_cancel (cc->tct);
- cc->tct = GNUNET_SCHEDULER_NO_TASK;
+ cc->tct = NULL;
GNUNET_CONTAINER_DLL_remove (tth->cc_head, tth->cc_tail, cc);
GNUNET_free (cc);