diff options
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gns_api.c | 8 | ||||
-rw-r--r-- | src/gns/gnunet-bcd.c | 14 | ||||
-rw-r--r-- | src/gns/gnunet-dns2gns.c | 10 | ||||
-rw-r--r-- | src/gns/gnunet-gns-proxy.c | 72 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns.c | 10 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 12 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_shorten.c | 6 | ||||
-rw-r--r-- | src/gns/test_gns_proxy.c | 18 |
8 files changed, 75 insertions, 75 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 9f7f28b71..327f89976 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -154,7 +154,7 @@ struct GNUNET_GNS_Handle | |||
154 | /** | 154 | /** |
155 | * Reconnect task | 155 | * Reconnect task |
156 | */ | 156 | */ |
157 | GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 157 | struct GNUNET_SCHEDULER_Task * reconnect_task; |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * How long do we wait until we try to reconnect? | 160 | * How long do we wait until we try to reconnect? |
@@ -210,7 +210,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
210 | { | 210 | { |
211 | struct GNUNET_GNS_Handle *handle = cls; | 211 | struct GNUNET_GNS_Handle *handle = cls; |
212 | 212 | ||
213 | handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 213 | handle->reconnect_task = NULL; |
214 | reconnect (handle); | 214 | reconnect (handle); |
215 | } | 215 | } |
216 | 216 | ||
@@ -484,10 +484,10 @@ GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle) | |||
484 | GNUNET_CLIENT_disconnect (handle->client); | 484 | GNUNET_CLIENT_disconnect (handle->client); |
485 | handle->client = NULL; | 485 | handle->client = NULL; |
486 | } | 486 | } |
487 | if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task) | 487 | if (NULL != handle->reconnect_task) |
488 | { | 488 | { |
489 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); | 489 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); |
490 | handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK; | 490 | handle->reconnect_task = NULL; |
491 | } | 491 | } |
492 | GNUNET_assert (NULL == handle->lookup_head); | 492 | GNUNET_assert (NULL == handle->lookup_head); |
493 | GNUNET_free (handle); | 493 | GNUNET_free (handle); |
diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c index 4e018c12d..200591f41 100644 --- a/src/gns/gnunet-bcd.c +++ b/src/gns/gnunet-bcd.c | |||
@@ -51,7 +51,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; | |||
51 | /** | 51 | /** |
52 | * Our primary task for the HTTPD. | 52 | * Our primary task for the HTTPD. |
53 | */ | 53 | */ |
54 | static GNUNET_SCHEDULER_TaskIdentifier http_task; | 54 | static struct GNUNET_SCHEDULER_Task * http_task; |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * Our main website. | 57 | * Our main website. |
@@ -278,7 +278,7 @@ access_handler_callback (void *cls, struct MHD_Connection *connection, | |||
278 | * Function that queries MHD's select sets and | 278 | * Function that queries MHD's select sets and |
279 | * starts the task waiting for them. | 279 | * starts the task waiting for them. |
280 | */ | 280 | */ |
281 | static GNUNET_SCHEDULER_TaskIdentifier | 281 | static struct GNUNET_SCHEDULER_Task * |
282 | prepare_daemon (struct MHD_Daemon *daemon_handle); | 282 | prepare_daemon (struct MHD_Daemon *daemon_handle); |
283 | 283 | ||
284 | 284 | ||
@@ -291,7 +291,7 @@ run_daemon (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
291 | { | 291 | { |
292 | struct MHD_Daemon *daemon_handle = cls; | 292 | struct MHD_Daemon *daemon_handle = cls; |
293 | 293 | ||
294 | http_task = GNUNET_SCHEDULER_NO_TASK; | 294 | http_task = NULL; |
295 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 295 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
296 | return; | 296 | return; |
297 | GNUNET_assert (MHD_YES == MHD_run (daemon_handle)); | 297 | GNUNET_assert (MHD_YES == MHD_run (daemon_handle)); |
@@ -303,10 +303,10 @@ run_daemon (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
303 | * Function that queries MHD's select sets and | 303 | * Function that queries MHD's select sets and |
304 | * starts the task waiting for them. | 304 | * starts the task waiting for them. |
305 | */ | 305 | */ |
306 | static GNUNET_SCHEDULER_TaskIdentifier | 306 | static struct GNUNET_SCHEDULER_Task * |
307 | prepare_daemon (struct MHD_Daemon *daemon_handle) | 307 | prepare_daemon (struct MHD_Daemon *daemon_handle) |
308 | { | 308 | { |
309 | GNUNET_SCHEDULER_TaskIdentifier ret; | 309 | struct GNUNET_SCHEDULER_Task * ret; |
310 | fd_set rs; | 310 | fd_set rs; |
311 | fd_set ws; | 311 | fd_set ws; |
312 | fd_set es; | 312 | fd_set es; |
@@ -389,10 +389,10 @@ server_stop (void *cls, | |||
389 | { | 389 | { |
390 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 390 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
391 | "HTTP server shutdown\n"); | 391 | "HTTP server shutdown\n"); |
392 | if (GNUNET_SCHEDULER_NO_TASK != http_task) | 392 | if (NULL != http_task) |
393 | { | 393 | { |
394 | GNUNET_SCHEDULER_cancel (http_task); | 394 | GNUNET_SCHEDULER_cancel (http_task); |
395 | http_task = GNUNET_SCHEDULER_NO_TASK; | 395 | http_task = NULL; |
396 | } | 396 | } |
397 | if (NULL != daemon_handle) | 397 | if (NULL != daemon_handle) |
398 | { | 398 | { |
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 | { |
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 93aee2004..47875281b 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -356,7 +356,7 @@ struct MhdHttpList | |||
356 | /** | 356 | /** |
357 | * The task ID | 357 | * The task ID |
358 | */ | 358 | */ |
359 | GNUNET_SCHEDULER_TaskIdentifier httpd_task; | 359 | struct GNUNET_SCHEDULER_Task * httpd_task; |
360 | 360 | ||
361 | /** | 361 | /** |
362 | * is this an ssl daemon? | 362 | * is this an ssl daemon? |
@@ -456,17 +456,17 @@ struct Socks5Request | |||
456 | /** | 456 | /** |
457 | * Client socket read task | 457 | * Client socket read task |
458 | */ | 458 | */ |
459 | GNUNET_SCHEDULER_TaskIdentifier rtask; | 459 | struct GNUNET_SCHEDULER_Task * rtask; |
460 | 460 | ||
461 | /** | 461 | /** |
462 | * Client socket write task | 462 | * Client socket write task |
463 | */ | 463 | */ |
464 | GNUNET_SCHEDULER_TaskIdentifier wtask; | 464 | struct GNUNET_SCHEDULER_Task * wtask; |
465 | 465 | ||
466 | /** | 466 | /** |
467 | * Timeout task | 467 | * Timeout task |
468 | */ | 468 | */ |
469 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 469 | struct GNUNET_SCHEDULER_Task * timeout_task; |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * Read buffer | 472 | * Read buffer |
@@ -593,17 +593,17 @@ static struct GNUNET_NETWORK_Handle *lsock6; | |||
593 | /** | 593 | /** |
594 | * The listen task ID for IPv4 | 594 | * The listen task ID for IPv4 |
595 | */ | 595 | */ |
596 | static GNUNET_SCHEDULER_TaskIdentifier ltask4; | 596 | static struct GNUNET_SCHEDULER_Task * ltask4; |
597 | 597 | ||
598 | /** | 598 | /** |
599 | * The listen task ID for IPv6 | 599 | * The listen task ID for IPv6 |
600 | */ | 600 | */ |
601 | static GNUNET_SCHEDULER_TaskIdentifier ltask6; | 601 | static struct GNUNET_SCHEDULER_Task * ltask6; |
602 | 602 | ||
603 | /** | 603 | /** |
604 | * The cURL download task (curl multi API). | 604 | * The cURL download task (curl multi API). |
605 | */ | 605 | */ |
606 | static GNUNET_SCHEDULER_TaskIdentifier curl_download_task; | 606 | static struct GNUNET_SCHEDULER_Task * curl_download_task; |
607 | 607 | ||
608 | /** | 608 | /** |
609 | * The cURL multi handle | 609 | * The cURL multi handle |
@@ -716,11 +716,11 @@ cleanup_s5r (struct Socks5Request *s5r) | |||
716 | if ( (NULL != s5r->response) && | 716 | if ( (NULL != s5r->response) && |
717 | (curl_failure_response != s5r->response) ) | 717 | (curl_failure_response != s5r->response) ) |
718 | MHD_destroy_response (s5r->response); | 718 | MHD_destroy_response (s5r->response); |
719 | if (GNUNET_SCHEDULER_NO_TASK != s5r->rtask) | 719 | if (NULL != s5r->rtask) |
720 | GNUNET_SCHEDULER_cancel (s5r->rtask); | 720 | GNUNET_SCHEDULER_cancel (s5r->rtask); |
721 | if (GNUNET_SCHEDULER_NO_TASK != s5r->timeout_task) | 721 | if (NULL != s5r->timeout_task) |
722 | GNUNET_SCHEDULER_cancel (s5r->timeout_task); | 722 | GNUNET_SCHEDULER_cancel (s5r->timeout_task); |
723 | if (GNUNET_SCHEDULER_NO_TASK != s5r->wtask) | 723 | if (NULL != s5r->wtask) |
724 | GNUNET_SCHEDULER_cancel (s5r->wtask); | 724 | GNUNET_SCHEDULER_cancel (s5r->wtask); |
725 | if (NULL != s5r->gns_lookup) | 725 | if (NULL != s5r->gns_lookup) |
726 | GNUNET_GNS_lookup_cancel (s5r->gns_lookup); | 726 | GNUNET_GNS_lookup_cancel (s5r->gns_lookup); |
@@ -1266,10 +1266,10 @@ curl_download_prepare () | |||
1266 | long to; | 1266 | long to; |
1267 | struct GNUNET_TIME_Relative rtime; | 1267 | struct GNUNET_TIME_Relative rtime; |
1268 | 1268 | ||
1269 | if (GNUNET_SCHEDULER_NO_TASK != curl_download_task) | 1269 | if (NULL != curl_download_task) |
1270 | { | 1270 | { |
1271 | GNUNET_SCHEDULER_cancel (curl_download_task); | 1271 | GNUNET_SCHEDULER_cancel (curl_download_task); |
1272 | curl_download_task = GNUNET_SCHEDULER_NO_TASK; | 1272 | curl_download_task = NULL; |
1273 | } | 1273 | } |
1274 | max = -1; | 1274 | max = -1; |
1275 | FD_ZERO (&rs); | 1275 | FD_ZERO (&rs); |
@@ -1327,7 +1327,7 @@ curl_task_download (void *cls, | |||
1327 | CURLMcode mret; | 1327 | CURLMcode mret; |
1328 | struct Socks5Request *s5r; | 1328 | struct Socks5Request *s5r; |
1329 | 1329 | ||
1330 | curl_download_task = GNUNET_SCHEDULER_NO_TASK; | 1330 | curl_download_task = NULL; |
1331 | do | 1331 | do |
1332 | { | 1332 | { |
1333 | running = 0; | 1333 | running = 0; |
@@ -1750,7 +1750,7 @@ mhd_log_callback (void *cls, | |||
1750 | } | 1750 | } |
1751 | s5r->url = GNUNET_strdup (url); | 1751 | s5r->url = GNUNET_strdup (url); |
1752 | GNUNET_SCHEDULER_cancel (s5r->timeout_task); | 1752 | GNUNET_SCHEDULER_cancel (s5r->timeout_task); |
1753 | s5r->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1753 | s5r->timeout_task = NULL; |
1754 | return s5r; | 1754 | return s5r; |
1755 | } | 1755 | } |
1756 | } | 1756 | } |
@@ -1772,10 +1772,10 @@ kill_httpd (struct MhdHttpList *hd) | |||
1772 | hd); | 1772 | hd); |
1773 | GNUNET_free_non_null (hd->domain); | 1773 | GNUNET_free_non_null (hd->domain); |
1774 | MHD_stop_daemon (hd->daemon); | 1774 | MHD_stop_daemon (hd->daemon); |
1775 | if (GNUNET_SCHEDULER_NO_TASK != hd->httpd_task) | 1775 | if (NULL != hd->httpd_task) |
1776 | { | 1776 | { |
1777 | GNUNET_SCHEDULER_cancel (hd->httpd_task); | 1777 | GNUNET_SCHEDULER_cancel (hd->httpd_task); |
1778 | hd->httpd_task = GNUNET_SCHEDULER_NO_TASK; | 1778 | hd->httpd_task = NULL; |
1779 | } | 1779 | } |
1780 | GNUNET_free_non_null (hd->proxy_cert); | 1780 | GNUNET_free_non_null (hd->proxy_cert); |
1781 | if (hd == httpd) | 1781 | if (hd == httpd) |
@@ -1796,7 +1796,7 @@ kill_httpd_task (void *cls, | |||
1796 | { | 1796 | { |
1797 | struct MhdHttpList *hd = cls; | 1797 | struct MhdHttpList *hd = cls; |
1798 | 1798 | ||
1799 | hd->httpd_task = GNUNET_SCHEDULER_NO_TASK; | 1799 | hd->httpd_task = NULL; |
1800 | kill_httpd (hd); | 1800 | kill_httpd (hd); |
1801 | } | 1801 | } |
1802 | 1802 | ||
@@ -1858,7 +1858,7 @@ schedule_httpd (struct MhdHttpList *hd) | |||
1858 | wrs = NULL; | 1858 | wrs = NULL; |
1859 | wws = NULL; | 1859 | wws = NULL; |
1860 | } | 1860 | } |
1861 | if (GNUNET_SCHEDULER_NO_TASK != hd->httpd_task) | 1861 | if (NULL != hd->httpd_task) |
1862 | GNUNET_SCHEDULER_cancel (hd->httpd_task); | 1862 | GNUNET_SCHEDULER_cancel (hd->httpd_task); |
1863 | if ( (MHD_YES != haveto) && | 1863 | if ( (MHD_YES != haveto) && |
1864 | (-1 == max) && | 1864 | (-1 == max) && |
@@ -1895,7 +1895,7 @@ do_httpd (void *cls, | |||
1895 | { | 1895 | { |
1896 | struct MhdHttpList *hd = cls; | 1896 | struct MhdHttpList *hd = cls; |
1897 | 1897 | ||
1898 | hd->httpd_task = GNUNET_SCHEDULER_NO_TASK; | 1898 | hd->httpd_task = NULL; |
1899 | MHD_run (hd->daemon); | 1899 | MHD_run (hd->daemon); |
1900 | schedule_httpd (hd); | 1900 | schedule_httpd (hd); |
1901 | } | 1901 | } |
@@ -1909,7 +1909,7 @@ do_httpd (void *cls, | |||
1909 | static void | 1909 | static void |
1910 | run_mhd_now (struct MhdHttpList *hd) | 1910 | run_mhd_now (struct MhdHttpList *hd) |
1911 | { | 1911 | { |
1912 | if (GNUNET_SCHEDULER_NO_TASK != | 1912 | if (NULL != |
1913 | hd->httpd_task) | 1913 | hd->httpd_task) |
1914 | GNUNET_SCHEDULER_cancel (hd->httpd_task); | 1914 | GNUNET_SCHEDULER_cancel (hd->httpd_task); |
1915 | hd->httpd_task = GNUNET_SCHEDULER_add_now (&do_httpd, | 1915 | hd->httpd_task = GNUNET_SCHEDULER_add_now (&do_httpd, |
@@ -2146,7 +2146,7 @@ timeout_s5r_handshake (void *cls, | |||
2146 | { | 2146 | { |
2147 | struct Socks5Request *s5r = cls; | 2147 | struct Socks5Request *s5r = cls; |
2148 | 2148 | ||
2149 | s5r->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 2149 | s5r->timeout_task = NULL; |
2150 | cleanup_s5r (s5r); | 2150 | cleanup_s5r (s5r); |
2151 | } | 2151 | } |
2152 | 2152 | ||
@@ -2221,7 +2221,7 @@ do_write (void *cls, | |||
2221 | struct Socks5Request *s5r = cls; | 2221 | struct Socks5Request *s5r = cls; |
2222 | ssize_t len; | 2222 | ssize_t len; |
2223 | 2223 | ||
2224 | s5r->wtask = GNUNET_SCHEDULER_NO_TASK; | 2224 | s5r->wtask = NULL; |
2225 | len = GNUNET_NETWORK_socket_send (s5r->sock, | 2225 | len = GNUNET_NETWORK_socket_send (s5r->sock, |
2226 | s5r->wbuf, | 2226 | s5r->wbuf, |
2227 | s5r->wbuf_len); | 2227 | s5r->wbuf_len); |
@@ -2253,7 +2253,7 @@ do_write (void *cls, | |||
2253 | GNUNET_assert (0); | 2253 | GNUNET_assert (0); |
2254 | break; | 2254 | break; |
2255 | case SOCKS5_REQUEST: | 2255 | case SOCKS5_REQUEST: |
2256 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != s5r->rtask); | 2256 | GNUNET_assert (NULL != s5r->rtask); |
2257 | break; | 2257 | break; |
2258 | case SOCKS5_DATA_TRANSFER: | 2258 | case SOCKS5_DATA_TRANSFER: |
2259 | setup_data_transfer (s5r); | 2259 | setup_data_transfer (s5r); |
@@ -2285,7 +2285,7 @@ signal_socks_failure (struct Socks5Request *s5r, | |||
2285 | s_resp->version = SOCKS_VERSION_5; | 2285 | s_resp->version = SOCKS_VERSION_5; |
2286 | s_resp->reply = sc; | 2286 | s_resp->reply = sc; |
2287 | s5r->state = SOCKS5_WRITE_THEN_CLEANUP; | 2287 | s5r->state = SOCKS5_WRITE_THEN_CLEANUP; |
2288 | if (GNUNET_SCHEDULER_NO_TASK != s5r->wtask) | 2288 | if (NULL != s5r->wtask) |
2289 | s5r->wtask = | 2289 | s5r->wtask = |
2290 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 2290 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
2291 | s5r->sock, | 2291 | s5r->sock, |
@@ -2314,7 +2314,7 @@ signal_socks_success (struct Socks5Request *s5r) | |||
2314 | sizeof (struct in_addr) + sizeof (uint16_t)); | 2314 | sizeof (struct in_addr) + sizeof (uint16_t)); |
2315 | s5r->wbuf_len += sizeof (struct Socks5ServerResponseMessage) + | 2315 | s5r->wbuf_len += sizeof (struct Socks5ServerResponseMessage) + |
2316 | sizeof (struct in_addr) + sizeof (uint16_t); | 2316 | sizeof (struct in_addr) + sizeof (uint16_t); |
2317 | if (GNUNET_SCHEDULER_NO_TASK == s5r->wtask) | 2317 | if (NULL == s5r->wtask) |
2318 | s5r->wtask = | 2318 | s5r->wtask = |
2319 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 2319 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
2320 | s5r->sock, | 2320 | s5r->sock, |
@@ -2482,7 +2482,7 @@ do_s5r_read (void *cls, | |||
2482 | ssize_t rlen; | 2482 | ssize_t rlen; |
2483 | size_t alen; | 2483 | size_t alen; |
2484 | 2484 | ||
2485 | s5r->rtask = GNUNET_SCHEDULER_NO_TASK; | 2485 | s5r->rtask = NULL; |
2486 | if ( (NULL != tc->read_ready) && | 2486 | if ( (NULL != tc->read_ready) && |
2487 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, s5r->sock)) ) | 2487 | (GNUNET_NETWORK_fdset_isset (tc->read_ready, s5r->sock)) ) |
2488 | { | 2488 | { |
@@ -2527,7 +2527,7 @@ do_s5r_read (void *cls, | |||
2527 | s5r->wbuf_len = sizeof (struct Socks5ServerHelloMessage); | 2527 | s5r->wbuf_len = sizeof (struct Socks5ServerHelloMessage); |
2528 | s_hello->version = SOCKS_VERSION_5; | 2528 | s_hello->version = SOCKS_VERSION_5; |
2529 | s_hello->auth_method = SOCKS_AUTH_NONE; | 2529 | s_hello->auth_method = SOCKS_AUTH_NONE; |
2530 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == s5r->wtask); | 2530 | GNUNET_assert (NULL == s5r->wtask); |
2531 | s5r->wtask = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 2531 | s5r->wtask = GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
2532 | s5r->sock, | 2532 | s5r->sock, |
2533 | &do_write, s5r); | 2533 | &do_write, s5r); |
@@ -2666,7 +2666,7 @@ do_s5r_read (void *cls, | |||
2666 | } | 2666 | } |
2667 | /* We are done reading right now */ | 2667 | /* We are done reading right now */ |
2668 | GNUNET_SCHEDULER_cancel (s5r->rtask); | 2668 | GNUNET_SCHEDULER_cancel (s5r->rtask); |
2669 | s5r->rtask = GNUNET_SCHEDULER_NO_TASK; | 2669 | s5r->rtask = NULL; |
2670 | return; | 2670 | return; |
2671 | case SOCKS5_RESOLVING: | 2671 | case SOCKS5_RESOLVING: |
2672 | GNUNET_assert (0); | 2672 | GNUNET_assert (0); |
@@ -2696,9 +2696,9 @@ do_accept (void *cls, | |||
2696 | struct Socks5Request *s5r; | 2696 | struct Socks5Request *s5r; |
2697 | 2697 | ||
2698 | if (lsock == lsock4) | 2698 | if (lsock == lsock4) |
2699 | ltask4 = GNUNET_SCHEDULER_NO_TASK; | 2699 | ltask4 = NULL; |
2700 | else | 2700 | else |
2701 | ltask6 = GNUNET_SCHEDULER_NO_TASK; | 2701 | ltask6 = NULL; |
2702 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 2702 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
2703 | return; | 2703 | return; |
2704 | if (lsock == lsock4) | 2704 | if (lsock == lsock4) |
@@ -2778,20 +2778,20 @@ do_shutdown (void *cls, | |||
2778 | GNUNET_GNS_disconnect (gns_handle); | 2778 | GNUNET_GNS_disconnect (gns_handle); |
2779 | gns_handle = NULL; | 2779 | gns_handle = NULL; |
2780 | } | 2780 | } |
2781 | if (GNUNET_SCHEDULER_NO_TASK != curl_download_task) | 2781 | if (NULL != curl_download_task) |
2782 | { | 2782 | { |
2783 | GNUNET_SCHEDULER_cancel (curl_download_task); | 2783 | GNUNET_SCHEDULER_cancel (curl_download_task); |
2784 | curl_download_task = GNUNET_SCHEDULER_NO_TASK; | 2784 | curl_download_task = NULL; |
2785 | } | 2785 | } |
2786 | if (GNUNET_SCHEDULER_NO_TASK != ltask4) | 2786 | if (NULL != ltask4) |
2787 | { | 2787 | { |
2788 | GNUNET_SCHEDULER_cancel (ltask4); | 2788 | GNUNET_SCHEDULER_cancel (ltask4); |
2789 | ltask4 = GNUNET_SCHEDULER_NO_TASK; | 2789 | ltask4 = NULL; |
2790 | } | 2790 | } |
2791 | if (GNUNET_SCHEDULER_NO_TASK != ltask6) | 2791 | if (NULL != ltask6) |
2792 | { | 2792 | { |
2793 | GNUNET_SCHEDULER_cancel (ltask6); | 2793 | GNUNET_SCHEDULER_cancel (ltask6); |
2794 | ltask6 = GNUNET_SCHEDULER_NO_TASK; | 2794 | ltask6 = NULL; |
2795 | } | 2795 | } |
2796 | gnutls_x509_crt_deinit (proxy_ca.cert); | 2796 | gnutls_x509_crt_deinit (proxy_ca.cert); |
2797 | gnutls_x509_privkey_deinit (proxy_ca.key); | 2797 | gnutls_x509_privkey_deinit (proxy_ca.key); |
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 57cdbc5f5..d95c28450 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -218,7 +218,7 @@ static struct GNUNET_TIME_Relative zone_publish_time_window; | |||
218 | /** | 218 | /** |
219 | * zone publish task | 219 | * zone publish task |
220 | */ | 220 | */ |
221 | static GNUNET_SCHEDULER_TaskIdentifier zone_publish_task; | 221 | static struct GNUNET_SCHEDULER_Task * zone_publish_task; |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * #GNUNET_YES if zone has never been published before | 224 | * #GNUNET_YES if zone has never been published before |
@@ -281,10 +281,10 @@ shutdown_task (void *cls, | |||
281 | GNUNET_STATISTICS_destroy (statistics, GNUNET_NO); | 281 | GNUNET_STATISTICS_destroy (statistics, GNUNET_NO); |
282 | statistics = NULL; | 282 | statistics = NULL; |
283 | } | 283 | } |
284 | if (GNUNET_SCHEDULER_NO_TASK != zone_publish_task) | 284 | if (NULL != zone_publish_task) |
285 | { | 285 | { |
286 | GNUNET_SCHEDULER_cancel (zone_publish_task); | 286 | GNUNET_SCHEDULER_cancel (zone_publish_task); |
287 | zone_publish_task = GNUNET_SCHEDULER_NO_TASK; | 287 | zone_publish_task = NULL; |
288 | } | 288 | } |
289 | if (NULL != namestore_iter) | 289 | if (NULL != namestore_iter) |
290 | { | 290 | { |
@@ -329,7 +329,7 @@ static void | |||
329 | publish_zone_dht_next (void *cls, | 329 | publish_zone_dht_next (void *cls, |
330 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 330 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
331 | { | 331 | { |
332 | zone_publish_task = GNUNET_SCHEDULER_NO_TASK; | 332 | zone_publish_task = NULL; |
333 | GNUNET_NAMESTORE_zone_iterator_next (namestore_iter); | 333 | GNUNET_NAMESTORE_zone_iterator_next (namestore_iter); |
334 | } | 334 | } |
335 | 335 | ||
@@ -609,7 +609,7 @@ static void | |||
609 | publish_zone_dht_start (void *cls, | 609 | publish_zone_dht_start (void *cls, |
610 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 610 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
611 | { | 611 | { |
612 | zone_publish_task = GNUNET_SCHEDULER_NO_TASK; | 612 | zone_publish_task = NULL; |
613 | 613 | ||
614 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 614 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
615 | "Starting DHT zone update!\n"); | 615 | "Starting DHT zone update!\n"); |
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 897a8b218..9e901f60c 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -334,7 +334,7 @@ struct GNS_ResolverHandle | |||
334 | /** | 334 | /** |
335 | * ID of a task associated with the resolution process. | 335 | * ID of a task associated with the resolution process. |
336 | */ | 336 | */ |
337 | GNUNET_SCHEDULER_TaskIdentifier task_id; | 337 | struct GNUNET_SCHEDULER_Task * task_id; |
338 | 338 | ||
339 | /** | 339 | /** |
340 | * The name to resolve | 340 | * The name to resolve |
@@ -549,7 +549,7 @@ fail_resolution (void *cls, | |||
549 | { | 549 | { |
550 | struct GNS_ResolverHandle *rh = cls; | 550 | struct GNS_ResolverHandle *rh = cls; |
551 | 551 | ||
552 | rh->task_id = GNUNET_SCHEDULER_NO_TASK; | 552 | rh->task_id = NULL; |
553 | rh->proc (rh->proc_cls, 0, NULL); | 553 | rh->proc (rh->proc_cls, 0, NULL); |
554 | GNS_resolver_lookup_cancel (rh); | 554 | GNS_resolver_lookup_cancel (rh); |
555 | } | 555 | } |
@@ -845,7 +845,7 @@ dns_result_parser (void *cls, | |||
845 | 845 | ||
846 | rh->dns_request = NULL; | 846 | rh->dns_request = NULL; |
847 | GNUNET_SCHEDULER_cancel (rh->task_id); | 847 | GNUNET_SCHEDULER_cancel (rh->task_id); |
848 | rh->task_id = GNUNET_SCHEDULER_NO_TASK; | 848 | rh->task_id = NULL; |
849 | p = GNUNET_DNSPARSER_parse ((const char *) dns, | 849 | p = GNUNET_DNSPARSER_parse ((const char *) dns, |
850 | dns_len); | 850 | dns_len); |
851 | if (NULL == p) | 851 | if (NULL == p) |
@@ -2232,7 +2232,7 @@ recursive_resolution (void *cls, | |||
2232 | { | 2232 | { |
2233 | struct GNS_ResolverHandle *rh = cls; | 2233 | struct GNS_ResolverHandle *rh = cls; |
2234 | 2234 | ||
2235 | rh->task_id = GNUNET_SCHEDULER_NO_TASK; | 2235 | rh->task_id = NULL; |
2236 | if (MAX_RECURSION < rh->loop_limiter++) | 2236 | if (MAX_RECURSION < rh->loop_limiter++) |
2237 | { | 2237 | { |
2238 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2238 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -2456,10 +2456,10 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh) | |||
2456 | GNUNET_free (rh->g2dc); | 2456 | GNUNET_free (rh->g2dc); |
2457 | rh->g2dc = NULL; | 2457 | rh->g2dc = NULL; |
2458 | } | 2458 | } |
2459 | if (GNUNET_SCHEDULER_NO_TASK != rh->task_id) | 2459 | if (NULL != rh->task_id) |
2460 | { | 2460 | { |
2461 | GNUNET_SCHEDULER_cancel (rh->task_id); | 2461 | GNUNET_SCHEDULER_cancel (rh->task_id); |
2462 | rh->task_id = GNUNET_SCHEDULER_NO_TASK; | 2462 | rh->task_id = NULL; |
2463 | } | 2463 | } |
2464 | if (NULL != rh->get_handle) | 2464 | if (NULL != rh->get_handle) |
2465 | { | 2465 | { |
diff --git a/src/gns/gnunet-service-gns_shorten.c b/src/gns/gnunet-service-gns_shorten.c index 34dcd42f6..f744c3d6f 100644 --- a/src/gns/gnunet-service-gns_shorten.c +++ b/src/gns/gnunet-service-gns_shorten.c | |||
@@ -106,7 +106,7 @@ struct GetPseuAuthorityHandle | |||
106 | /** | 106 | /** |
107 | * Task to abort DHT lookup operation. | 107 | * Task to abort DHT lookup operation. |
108 | */ | 108 | */ |
109 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 109 | struct GNUNET_SCHEDULER_Task * timeout_task; |
110 | 110 | ||
111 | }; | 111 | }; |
112 | 112 | ||
@@ -160,10 +160,10 @@ free_get_pseu_authority_handle (struct GetPseuAuthorityHandle *gph) | |||
160 | GNUNET_NAMECACHE_cancel (gph->namecache_task); | 160 | GNUNET_NAMECACHE_cancel (gph->namecache_task); |
161 | gph->namecache_task = NULL; | 161 | gph->namecache_task = NULL; |
162 | } | 162 | } |
163 | if (GNUNET_SCHEDULER_NO_TASK != gph->timeout_task) | 163 | if (NULL != gph->timeout_task) |
164 | { | 164 | { |
165 | GNUNET_SCHEDULER_cancel (gph->timeout_task); | 165 | GNUNET_SCHEDULER_cancel (gph->timeout_task); |
166 | gph->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 166 | gph->timeout_task = NULL; |
167 | } | 167 | } |
168 | GNUNET_CONTAINER_DLL_remove (gph_head, gph_tail, gph); | 168 | GNUNET_CONTAINER_DLL_remove (gph_head, gph_tail, gph); |
169 | GNUNET_free_non_null (gph->current_label); | 169 | GNUNET_free_non_null (gph->current_label); |
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 9e2c29fb4..1f7cc7d93 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -45,9 +45,9 @@ static struct GNUNET_NAMESTORE_Handle *namestore; | |||
45 | 45 | ||
46 | static struct MHD_Daemon *mhd; | 46 | static struct MHD_Daemon *mhd; |
47 | 47 | ||
48 | static GNUNET_SCHEDULER_TaskIdentifier mhd_task_id; | 48 | static struct GNUNET_SCHEDULER_Task * mhd_task_id; |
49 | 49 | ||
50 | static GNUNET_SCHEDULER_TaskIdentifier curl_task_id; | 50 | static struct GNUNET_SCHEDULER_Task * curl_task_id; |
51 | 51 | ||
52 | static CURL *curl; | 52 | static CURL *curl; |
53 | 53 | ||
@@ -117,15 +117,15 @@ mhd_ahc (void *cls, | |||
117 | static void | 117 | static void |
118 | do_shutdown () | 118 | do_shutdown () |
119 | { | 119 | { |
120 | if (mhd_task_id != GNUNET_SCHEDULER_NO_TASK) | 120 | if (mhd_task_id != NULL) |
121 | { | 121 | { |
122 | GNUNET_SCHEDULER_cancel (mhd_task_id); | 122 | GNUNET_SCHEDULER_cancel (mhd_task_id); |
123 | mhd_task_id = GNUNET_SCHEDULER_NO_TASK; | 123 | mhd_task_id = NULL; |
124 | } | 124 | } |
125 | if (curl_task_id != GNUNET_SCHEDULER_NO_TASK) | 125 | if (curl_task_id != NULL) |
126 | { | 126 | { |
127 | GNUNET_SCHEDULER_cancel (curl_task_id); | 127 | GNUNET_SCHEDULER_cancel (curl_task_id); |
128 | curl_task_id = GNUNET_SCHEDULER_NO_TASK; | 128 | curl_task_id = NULL; |
129 | } | 129 | } |
130 | if (NULL != mhd) | 130 | if (NULL != mhd) |
131 | { | 131 | { |
@@ -164,7 +164,7 @@ static void | |||
164 | curl_task (void *cls, | 164 | curl_task (void *cls, |
165 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 165 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
166 | { | 166 | { |
167 | curl_task_id = GNUNET_SCHEDULER_NO_TASK; | 167 | curl_task_id = NULL; |
168 | curl_main (); | 168 | curl_main (); |
169 | } | 169 | } |
170 | 170 | ||
@@ -314,7 +314,7 @@ static void | |||
314 | mhd_task (void *cls, | 314 | mhd_task (void *cls, |
315 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 315 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
316 | { | 316 | { |
317 | mhd_task_id = GNUNET_SCHEDULER_NO_TASK; | 317 | mhd_task_id = NULL; |
318 | MHD_run (mhd); | 318 | MHD_run (mhd); |
319 | mhd_main (); | 319 | mhd_main (); |
320 | } | 320 | } |
@@ -332,7 +332,7 @@ mhd_main () | |||
332 | unsigned MHD_LONG_LONG timeout; | 332 | unsigned MHD_LONG_LONG timeout; |
333 | struct GNUNET_TIME_Relative delay; | 333 | struct GNUNET_TIME_Relative delay; |
334 | 334 | ||
335 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == mhd_task_id); | 335 | GNUNET_assert (NULL == mhd_task_id); |
336 | FD_ZERO (&rs); | 336 | FD_ZERO (&rs); |
337 | FD_ZERO (&ws); | 337 | FD_ZERO (&ws); |
338 | FD_ZERO (&es); | 338 | FD_ZERO (&es); |