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/fs/test_fs_download.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/fs/test_fs_download.c')
-rw-r--r-- | src/fs/test_fs_download.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index 8dee24912..94e7e0733 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c | |||
@@ -57,7 +57,7 @@ static struct GNUNET_FS_DownloadContext *download; | |||
57 | 57 | ||
58 | static struct GNUNET_FS_PublishContext *publish; | 58 | static struct GNUNET_FS_PublishContext *publish; |
59 | 59 | ||
60 | static GNUNET_SCHEDULER_TaskIdentifier timeout_kill; | 60 | static struct GNUNET_SCHEDULER_Task * timeout_kill; |
61 | 61 | ||
62 | static char *fn; | 62 | static char *fn; |
63 | 63 | ||
@@ -80,7 +80,7 @@ timeout_kill_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
80 | publish = NULL; | 80 | publish = NULL; |
81 | } | 81 | } |
82 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Timeout downloading file\n"); | 82 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Timeout downloading file\n"); |
83 | timeout_kill = GNUNET_SCHEDULER_NO_TASK; | 83 | timeout_kill = NULL; |
84 | err = 1; | 84 | err = 1; |
85 | } | 85 | } |
86 | 86 | ||
@@ -120,7 +120,7 @@ abort_download_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
120 | GNUNET_free (fn); | 120 | GNUNET_free (fn); |
121 | fn = NULL; | 121 | fn = NULL; |
122 | GNUNET_SCHEDULER_cancel (timeout_kill); | 122 | GNUNET_SCHEDULER_cancel (timeout_kill); |
123 | timeout_kill = GNUNET_SCHEDULER_NO_TASK; | 123 | timeout_kill = NULL; |
124 | } | 124 | } |
125 | 125 | ||
126 | 126 | ||