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-tests/ats-testing-traffic.c | |
parent | 53cd5b8eda2fa8db86b0907a62a39598981d008a (diff) | |
download | gnunet-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/ats-tests/ats-testing-traffic.c')
-rw-r--r-- | src/ats-tests/ats-testing-traffic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ats-tests/ats-testing-traffic.c b/src/ats-tests/ats-testing-traffic.c index fca65b900..ffeaad126 100644 --- a/src/ats-tests/ats-testing-traffic.c +++ b/src/ats-tests/ats-testing-traffic.c | |||
@@ -171,7 +171,7 @@ comm_schedule_send (void *cls, | |||
171 | { | 171 | { |
172 | struct BenchmarkPartner *p = cls; | 172 | struct BenchmarkPartner *p = cls; |
173 | 173 | ||
174 | p->tg->send_task = GNUNET_SCHEDULER_NO_TASK; | 174 | p->tg->send_task = NULL; |
175 | p->last_message_sent = GNUNET_TIME_absolute_get(); | 175 | p->last_message_sent = GNUNET_TIME_absolute_get(); |
176 | if (GNUNET_YES == top->test_core) | 176 | if (GNUNET_YES == top->test_core) |
177 | { | 177 | { |
@@ -389,10 +389,10 @@ GNUNET_ATS_TEST_generate_traffic_stop (struct TrafficGenerator *tg) | |||
389 | GNUNET_CONTAINER_DLL_remove (tg_head, tg_tail, tg); | 389 | GNUNET_CONTAINER_DLL_remove (tg_head, tg_tail, tg); |
390 | tg->dest->tg = NULL; | 390 | tg->dest->tg = NULL; |
391 | 391 | ||
392 | if (GNUNET_SCHEDULER_NO_TASK != tg->send_task) | 392 | if (NULL != tg->send_task) |
393 | { | 393 | { |
394 | GNUNET_SCHEDULER_cancel (tg->send_task); | 394 | GNUNET_SCHEDULER_cancel (tg->send_task); |
395 | tg->send_task = GNUNET_SCHEDULER_NO_TASK; | 395 | tg->send_task = NULL; |
396 | } | 396 | } |
397 | if (top->test_core) | 397 | if (top->test_core) |
398 | { | 398 | { |