diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-24 01:10:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-24 01:10:47 +0000 |
commit | f1f603c7d0b3f03dca46a4f313472288eb080eb1 (patch) | |
tree | 3a29966b02dfb83e0a8a8d5c42b3116380209fb0 /src/ats/ats_api_performance.c | |
parent | 53cd5b8eda2fa8db86b0907a62a39598981d008a (diff) |
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/ats/ats_api_performance.c')
-rw-r--r-- | src/ats/ats_api_performance.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index b1c48bdde5..6d59920333 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c @@ -221,7 +221,7 @@ struct GNUNET_ATS_PerformanceHandle /** * Task to trigger reconnect. */ - GNUNET_SCHEDULER_TaskIdentifier task; + struct GNUNET_SCHEDULER_Task * task; /** * Monitor request multiplexing @@ -255,7 +255,7 @@ reconnect_task (void *cls, { struct GNUNET_ATS_PerformanceHandle *ph = cls; - ph->task = GNUNET_SCHEDULER_NO_TASK; + ph->task = NULL; reconnect (ph); } @@ -740,10 +740,10 @@ GNUNET_ATS_performance_done (struct GNUNET_ATS_PerformanceHandle *ph) GNUNET_free (rc); } - if (GNUNET_SCHEDULER_NO_TASK != ph->task) + if (NULL != ph->task) { GNUNET_SCHEDULER_cancel (ph->task); - ph->task = GNUNET_SCHEDULER_NO_TASK; + ph->task = NULL; } if (NULL != ph->client) { |