aboutsummaryrefslogtreecommitdiff
path: root/src/social
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/social
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/social')
-rw-r--r--src/social/test_social.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/social/test_social.c b/src/social/test_social.c
index 320526594..f17892953 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -48,7 +48,7 @@ int res;
48/** 48/**
49 * Handle for task for timeout termination. 49 * Handle for task for timeout termination.
50 */ 50 */
51GNUNET_SCHEDULER_TaskIdentifier end_badly_task; 51struct GNUNET_SCHEDULER_Task * end_badly_task;
52 52
53const struct GNUNET_CONFIGURATION_Handle *cfg; 53const struct GNUNET_CONFIGURATION_Handle *cfg;
54 54
@@ -196,10 +196,10 @@ end ()
196{ 196{
197 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending tests.\n"); 197 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending tests.\n");
198 198
199 if (end_badly_task != GNUNET_SCHEDULER_NO_TASK) 199 if (end_badly_task != NULL)
200 { 200 {
201 GNUNET_SCHEDULER_cancel (end_badly_task); 201 GNUNET_SCHEDULER_cancel (end_badly_task);
202 end_badly_task = GNUNET_SCHEDULER_NO_TASK; 202 end_badly_task = NULL;
203 } 203 }
204 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, 204 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS,
205 &end_normally, NULL); 205 &end_normally, NULL);