summaryrefslogtreecommitdiff
path: root/src/testing
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/testing
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/testing')
-rw-r--r--src/testing/gnunet-testing.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c
index a79e836c7..2db2fd737 100644
--- a/src/testing/gnunet-testing.c
+++ b/src/testing/gnunet-testing.c
@@ -76,7 +76,7 @@ static char *tmpfilename;
/**
* Task identifier of the task that waits for stdin.
*/
-static GNUNET_SCHEDULER_TaskIdentifier tid;
+static struct GNUNET_SCHEDULER_Task * tid;
/**
* Peer started for '-r'.
@@ -207,10 +207,10 @@ cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
if (0 != UNLINK (tmpfilename))
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", tmpfilename);
}
- if (GNUNET_SCHEDULER_NO_TASK != tid)
+ if (NULL != tid)
{
GNUNET_SCHEDULER_cancel (tid);
- tid = GNUNET_SCHEDULER_NO_TASK;
+ tid = NULL;
}
if (NULL != fh)
{
@@ -231,7 +231,7 @@ stdin_cb (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
int c;
- tid = GNUNET_SCHEDULER_NO_TASK;
+ tid = NULL;
if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason))
return;
GNUNET_assert (0 != (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason));