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/gns/gnunet-dns2gns.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/gns/gnunet-dns2gns.c')
-rw-r--r-- | src/gns/gnunet-dns2gns.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index bd909f938..0e347ca7e 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -80,7 +80,7 @@ struct Request | |||
80 | * Task run on timeout or shutdown to clean up without | 80 | * Task run on timeout or shutdown to clean up without |
81 | * response. | 81 | * response. |
82 | */ | 82 | */ |
83 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 83 | struct GNUNET_SCHEDULER_Task * timeout_task; |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Number of bytes in 'addr'. | 86 | * Number of bytes in 'addr'. |
@@ -113,12 +113,12 @@ static struct GNUNET_NETWORK_Handle *listen_socket6; | |||
113 | /** | 113 | /** |
114 | * Task for IPv4 socket. | 114 | * Task for IPv4 socket. |
115 | */ | 115 | */ |
116 | static GNUNET_SCHEDULER_TaskIdentifier t4; | 116 | static struct GNUNET_SCHEDULER_Task * t4; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Task for IPv6 socket. | 119 | * Task for IPv6 socket. |
120 | */ | 120 | */ |
121 | static GNUNET_SCHEDULER_TaskIdentifier t6; | 121 | static struct GNUNET_SCHEDULER_Task * t6; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * DNS suffix, suffix of this gateway in DNS; defaults to '.zkey.eu' | 124 | * DNS suffix, suffix of this gateway in DNS; defaults to '.zkey.eu' |
@@ -176,9 +176,9 @@ static void | |||
176 | do_shutdown (void *cls, | 176 | do_shutdown (void *cls, |
177 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 177 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
178 | { | 178 | { |
179 | if (GNUNET_SCHEDULER_NO_TASK != t4) | 179 | if (NULL != t4) |
180 | GNUNET_SCHEDULER_cancel (t4); | 180 | GNUNET_SCHEDULER_cancel (t4); |
181 | if (GNUNET_SCHEDULER_NO_TASK != t6) | 181 | if (NULL != t6) |
182 | GNUNET_SCHEDULER_cancel (t6); | 182 | GNUNET_SCHEDULER_cancel (t6); |
183 | if (NULL != listen_socket4) | 183 | if (NULL != listen_socket4) |
184 | { | 184 | { |