aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs_api.c12
-rw-r--r--src/fs/fs_api.h16
-rw-r--r--src/fs/fs_dirmetascan.c8
-rw-r--r--src/fs/fs_download.c22
-rw-r--r--src/fs/fs_list_indexed.c2
-rw-r--r--src/fs/fs_publish.c26
-rw-r--r--src/fs/fs_publish_ksk.c8
-rw-r--r--src/fs/fs_publish_ublock.c6
-rw-r--r--src/fs/fs_search.c50
-rw-r--r--src/fs/fs_test_lib.c16
-rw-r--r--src/fs/fs_test_lib.h2
-rw-r--r--src/fs/fs_tree.c4
-rw-r--r--src/fs/fs_tree.h2
-rw-r--r--src/fs/gnunet-auto-share.c16
-rw-r--r--src/fs/gnunet-daemon-fsprofiler.c20
-rw-r--r--src/fs/gnunet-fs-profiler.c4
-rw-r--r--src/fs/gnunet-publish.c16
-rw-r--r--src/fs/gnunet-service-fs.c6
-rw-r--r--src/fs/gnunet-service-fs_cadet_client.c18
-rw-r--r--src/fs/gnunet-service-fs_cadet_server.c12
-rw-r--r--src/fs/gnunet-service-fs_cp.c46
-rw-r--r--src/fs/gnunet-service-fs_lc.c10
-rw-r--r--src/fs/gnunet-service-fs_pe.c16
-rw-r--r--src/fs/gnunet-service-fs_pr.c18
-rw-r--r--src/fs/gnunet-service-fs_push.c10
-rw-r--r--src/fs/gnunet-service-fs_put.c10
-rw-r--r--src/fs/test_fs_download.c6
-rw-r--r--src/fs/test_fs_download_persistence.c6
-rw-r--r--src/fs/test_fs_namespace.c8
-rw-r--r--src/fs/test_fs_publish_persistence.c8
-rw-r--r--src/fs/test_fs_search.c8
-rw-r--r--src/fs/test_fs_search_persistence.c8
-rw-r--r--src/fs/test_fs_search_probes.c8
-rw-r--r--src/fs/test_fs_search_with_and.c8
34 files changed, 218 insertions, 218 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index 302020d7d..6c534ff32 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -131,7 +131,7 @@ process_job_queue (void *cls,
131 int num_downloads_change; 131 int num_downloads_change;
132 int block_limit_hit; 132 int block_limit_hit;
133 133
134 h->queue_job = GNUNET_SCHEDULER_NO_TASK; 134 h->queue_job = NULL;
135 /* restart_at will be set to the time when it makes sense to 135 /* restart_at will be set to the time when it makes sense to
136 re-evaluate the job queue (unless, of course, jobs complete 136 re-evaluate the job queue (unless, of course, jobs complete
137 or are added, then we'll be triggered immediately */ 137 or are added, then we'll be triggered immediately */
@@ -336,7 +336,7 @@ GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h,
336 qe->priority = priority; 336 qe->priority = priority;
337 GNUNET_CONTAINER_DLL_insert_after (h->pending_head, h->pending_tail, 337 GNUNET_CONTAINER_DLL_insert_after (h->pending_head, h->pending_tail,
338 h->pending_tail, qe); 338 h->pending_tail, qe);
339 if (h->queue_job != GNUNET_SCHEDULER_NO_TASK) 339 if (h->queue_job != NULL)
340 GNUNET_SCHEDULER_cancel (h->queue_job); 340 GNUNET_SCHEDULER_cancel (h->queue_job);
341 h->queue_job = GNUNET_SCHEDULER_add_now (&process_job_queue, h); 341 h->queue_job = GNUNET_SCHEDULER_add_now (&process_job_queue, h);
342 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 342 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -364,7 +364,7 @@ GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qe)
364 stop_job (qe); 364 stop_job (qe);
365 GNUNET_CONTAINER_DLL_remove (h->pending_head, h->pending_tail, qe); 365 GNUNET_CONTAINER_DLL_remove (h->pending_head, h->pending_tail, qe);
366 GNUNET_free (qe); 366 GNUNET_free (qe);
367 if (h->queue_job != GNUNET_SCHEDULER_NO_TASK) 367 if (h->queue_job != NULL)
368 GNUNET_SCHEDULER_cancel (h->queue_job); 368 GNUNET_SCHEDULER_cancel (h->queue_job);
369 h->queue_job = GNUNET_SCHEDULER_add_now (&process_job_queue, h); 369 h->queue_job = GNUNET_SCHEDULER_add_now (&process_job_queue, h);
370} 370}
@@ -1619,7 +1619,7 @@ deserialize_publish_file (void *cls,
1619 /* re-start publishing (if needed)... */ 1619 /* re-start publishing (if needed)... */
1620 if (GNUNET_YES != pc->all_done) 1620 if (GNUNET_YES != pc->all_done)
1621 { 1621 {
1622 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 1622 GNUNET_assert (NULL == pc->upload_task);
1623 pc->upload_task = 1623 pc->upload_task =
1624 GNUNET_SCHEDULER_add_with_priority 1624 GNUNET_SCHEDULER_add_with_priority
1625 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, 1625 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
@@ -2140,7 +2140,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc)
2140 GNUNET_assert ((GNUNET_YES == GNUNET_FS_uri_test_ksk (sc->uri)) || 2140 GNUNET_assert ((GNUNET_YES == GNUNET_FS_uri_test_ksk (sc->uri)) ||
2141 (GNUNET_YES == GNUNET_FS_uri_test_sks (sc->uri))); 2141 (GNUNET_YES == GNUNET_FS_uri_test_sks (sc->uri)));
2142 uris = GNUNET_FS_uri_to_string (sc->uri); 2142 uris = GNUNET_FS_uri_to_string (sc->uri);
2143 in_pause = (sc->task != GNUNET_SCHEDULER_NO_TASK) ? 'r' : '\0'; 2143 in_pause = (sc->task != NULL) ? 'r' : '\0';
2144 if ((GNUNET_OK != GNUNET_BIO_write_string (wh, uris)) || 2144 if ((GNUNET_OK != GNUNET_BIO_write_string (wh, uris)) ||
2145 (GNUNET_OK != write_start_time (wh, sc->start_time)) || 2145 (GNUNET_OK != write_start_time (wh, sc->start_time)) ||
2146 (GNUNET_OK != GNUNET_BIO_write_string (wh, sc->emsg)) || 2146 (GNUNET_OK != GNUNET_BIO_write_string (wh, sc->emsg)) ||
@@ -3130,7 +3130,7 @@ GNUNET_FS_stop (struct GNUNET_FS_Handle *h)
3130{ 3130{
3131 while (h->top_head != NULL) 3131 while (h->top_head != NULL)
3132 h->top_head->ssf (h->top_head->ssf_cls); 3132 h->top_head->ssf (h->top_head->ssf_cls);
3133 if (h->queue_job != GNUNET_SCHEDULER_NO_TASK) 3133 if (h->queue_job != NULL)
3134 GNUNET_SCHEDULER_cancel (h->queue_job); 3134 GNUNET_SCHEDULER_cancel (h->queue_job);
3135 GNUNET_free (h->client_name); 3135 GNUNET_free (h->client_name);
3136 GNUNET_free (h); 3136 GNUNET_free (h);
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h
index 157662a65..5fbdef6c2 100644
--- a/src/fs/fs_api.h
+++ b/src/fs/fs_api.h
@@ -601,7 +601,7 @@ struct GNUNET_FS_SearchResult
601 * complete on time (and that will need to be cancelled if we clean 601 * complete on time (and that will need to be cancelled if we clean
602 * up the search result before then). 602 * up the search result before then).
603 */ 603 */
604 GNUNET_SCHEDULER_TaskIdentifier probe_cancel_task; 604 struct GNUNET_SCHEDULER_Task * probe_cancel_task;
605 605
606 /** 606 /**
607 * When did the current probe become active? 607 * When did the current probe become active?
@@ -1170,13 +1170,13 @@ struct GNUNET_FS_Handle
1170 * Task that processes the jobs in the running and pending queues 1170 * Task that processes the jobs in the running and pending queues
1171 * (and moves jobs around as needed). 1171 * (and moves jobs around as needed).
1172 */ 1172 */
1173 GNUNET_SCHEDULER_TaskIdentifier queue_job; 1173 struct GNUNET_SCHEDULER_Task * queue_job;
1174 1174
1175 /** 1175 /**
1176 * Task we use to report periodically to the application that 1176 * Task we use to report periodically to the application that
1177 * certain search probes (from @e probes_head) are still running. 1177 * certain search probes (from @e probes_head) are still running.
1178 */ 1178 */
1179 GNUNET_SCHEDULER_TaskIdentifier probe_ping_task; 1179 struct GNUNET_SCHEDULER_Task * probe_ping_task;
1180 1180
1181 /** 1181 /**
1182 * Average time we take for a single request to be satisfied. 1182 * Average time we take for a single request to be satisfied.
@@ -1300,7 +1300,7 @@ struct GNUNET_FS_PublishContext
1300 * ID of the task performing the upload. NO_TASK if the upload has 1300 * ID of the task performing the upload. NO_TASK if the upload has
1301 * completed. 1301 * completed.
1302 */ 1302 */
1303 GNUNET_SCHEDULER_TaskIdentifier upload_task; 1303 struct GNUNET_SCHEDULER_Task * upload_task;
1304 1304
1305 /** 1305 /**
1306 * Storage space to reserve for the operation. 1306 * Storage space to reserve for the operation.
@@ -1629,10 +1629,10 @@ struct GNUNET_FS_SearchContext
1629 /** 1629 /**
1630 * ID of a task that is using this struct and that must be cancelled 1630 * ID of a task that is using this struct and that must be cancelled
1631 * when the search is being stopped (if not 1631 * when the search is being stopped (if not
1632 * #GNUNET_SCHEDULER_NO_TASK). Used for the task that adds some 1632 * #NULL). Used for the task that adds some
1633 * artificial delay when trying to reconnect to the FS service. 1633 * artificial delay when trying to reconnect to the FS service.
1634 */ 1634 */
1635 GNUNET_SCHEDULER_TaskIdentifier task; 1635 struct GNUNET_SCHEDULER_Task * task;
1636 1636
1637 /** 1637 /**
1638 * How many of the entries in the search request 1638 * How many of the entries in the search request
@@ -1961,12 +1961,12 @@ struct GNUNET_FS_DownloadContext
1961 /** 1961 /**
1962 * ID of a task that is using this struct and that must be cancelled 1962 * ID of a task that is using this struct and that must be cancelled
1963 * when the download is being stopped (if not 1963 * when the download is being stopped (if not
1964 * #GNUNET_SCHEDULER_NO_TASK). Used for the task that adds some 1964 * #NULL). Used for the task that adds some
1965 * artificial delay when trying to reconnect to the FS service or 1965 * artificial delay when trying to reconnect to the FS service or
1966 * the task processing incrementally the data on disk, or the 1966 * the task processing incrementally the data on disk, or the
1967 * task requesting blocks, etc. 1967 * task requesting blocks, etc.
1968 */ 1968 */
1969 GNUNET_SCHEDULER_TaskIdentifier task; 1969 struct GNUNET_SCHEDULER_Task * task;
1970 1970
1971 /** 1971 /**
1972 * What is the first offset that we're interested 1972 * What is the first offset that we're interested
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c
index 83e436b16..2477aab4b 100644
--- a/src/fs/fs_dirmetascan.c
+++ b/src/fs/fs_dirmetascan.c
@@ -80,7 +80,7 @@ struct GNUNET_FS_DirScanner
80 /** 80 /**
81 * Task scheduled when we are done. 81 * Task scheduled when we are done.
82 */ 82 */
83 GNUNET_SCHEDULER_TaskIdentifier stop_task; 83 struct GNUNET_SCHEDULER_Task * stop_task;
84 84
85 /** 85 /**
86 * Arguments for helper. 86 * Arguments for helper.
@@ -106,7 +106,7 @@ GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds)
106 /* free resources */ 106 /* free resources */
107 if (NULL != ds->toplevel) 107 if (NULL != ds->toplevel)
108 GNUNET_FS_share_tree_free (ds->toplevel); 108 GNUNET_FS_share_tree_free (ds->toplevel);
109 if (GNUNET_SCHEDULER_NO_TASK != ds->stop_task) 109 if (NULL != ds->stop_task)
110 GNUNET_SCHEDULER_cancel (ds->stop_task); 110 GNUNET_SCHEDULER_cancel (ds->stop_task);
111 GNUNET_free_non_null (ds->ex_arg); 111 GNUNET_free_non_null (ds->ex_arg);
112 GNUNET_free (ds->filename_expanded); 112 GNUNET_free (ds->filename_expanded);
@@ -230,7 +230,7 @@ finish_scan (void *cls,
230{ 230{
231 struct GNUNET_FS_DirScanner *ds = cls; 231 struct GNUNET_FS_DirScanner *ds = cls;
232 232
233 ds->stop_task = GNUNET_SCHEDULER_NO_TASK; 233 ds->stop_task = NULL;
234 if (NULL != ds->helper) 234 if (NULL != ds->helper)
235 { 235 {
236 GNUNET_HELPER_stop (ds->helper, GNUNET_NO); 236 GNUNET_HELPER_stop (ds->helper, GNUNET_NO);
@@ -427,7 +427,7 @@ helper_died_cb (void *cls)
427 struct GNUNET_FS_DirScanner *ds = cls; 427 struct GNUNET_FS_DirScanner *ds = cls;
428 428
429 ds->helper = NULL; 429 ds->helper = NULL;
430 if (GNUNET_SCHEDULER_NO_TASK != ds->stop_task) 430 if (NULL != ds->stop_task)
431 return; /* normal death, was finished */ 431 return; /* normal death, was finished */
432 ds->progress_callback (ds->progress_callback_cls, 432 ds->progress_callback (ds->progress_callback_cls,
433 NULL, GNUNET_SYSERR, 433 NULL, GNUNET_SYSERR,
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 348a0bc17..3a6072d8b 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -393,10 +393,10 @@ check_completed (struct GNUNET_FS_DownloadContext *dc)
393 GNUNET_FS_dequeue_ (dc->job_queue); 393 GNUNET_FS_dequeue_ (dc->job_queue);
394 dc->job_queue = NULL; 394 dc->job_queue = NULL;
395 } 395 }
396 if (GNUNET_SCHEDULER_NO_TASK != dc->task) 396 if (NULL != dc->task)
397 { 397 {
398 GNUNET_SCHEDULER_cancel (dc->task); 398 GNUNET_SCHEDULER_cancel (dc->task);
399 dc->task = GNUNET_SCHEDULER_NO_TASK; 399 dc->task = NULL;
400 } 400 }
401 if (NULL != dc->rfh) 401 if (NULL != dc->rfh)
402 { 402 {
@@ -1380,7 +1380,7 @@ do_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1380 struct GNUNET_FS_DownloadContext *dc = cls; 1380 struct GNUNET_FS_DownloadContext *dc = cls;
1381 struct GNUNET_CLIENT_Connection *client; 1381 struct GNUNET_CLIENT_Connection *client;
1382 1382
1383 dc->task = GNUNET_SCHEDULER_NO_TASK; 1383 dc->task = NULL;
1384 client = GNUNET_CLIENT_connect ("fs", dc->h->cfg); 1384 client = GNUNET_CLIENT_connect ("fs", dc->h->cfg);
1385 if (NULL == client) 1385 if (NULL == client)
1386 { 1386 {
@@ -1633,10 +1633,10 @@ reconstruct_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1633 struct GNUNET_FS_DownloadContext *dc = cls; 1633 struct GNUNET_FS_DownloadContext *dc = cls;
1634 1634
1635 /* clean up state from tree encoder */ 1635 /* clean up state from tree encoder */
1636 if (dc->task != GNUNET_SCHEDULER_NO_TASK) 1636 if (dc->task != NULL)
1637 { 1637 {
1638 GNUNET_SCHEDULER_cancel (dc->task); 1638 GNUNET_SCHEDULER_cancel (dc->task);
1639 dc->task = GNUNET_SCHEDULER_NO_TASK; 1639 dc->task = NULL;
1640 } 1640 }
1641 if (NULL != dc->rfh) 1641 if (NULL != dc->rfh)
1642 { 1642 {
@@ -1662,7 +1662,7 @@ get_next_block (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1662{ 1662{
1663 struct GNUNET_FS_DownloadContext *dc = cls; 1663 struct GNUNET_FS_DownloadContext *dc = cls;
1664 1664
1665 dc->task = GNUNET_SCHEDULER_NO_TASK; 1665 dc->task = NULL;
1666 GNUNET_FS_tree_encoder_next (dc->te); 1666 GNUNET_FS_tree_encoder_next (dc->te);
1667} 1667}
1668 1668
@@ -1866,7 +1866,7 @@ GNUNET_FS_download_start_task_ (void *cls,
1866 struct GNUNET_DISK_FileHandle *fh; 1866 struct GNUNET_DISK_FileHandle *fh;
1867 1867
1868 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start task running...\n"); 1868 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start task running...\n");
1869 dc->task = GNUNET_SCHEDULER_NO_TASK; 1869 dc->task = NULL;
1870 if (0 == dc->length) 1870 if (0 == dc->length)
1871 { 1871 {
1872 /* no bytes required! */ 1872 /* no bytes required! */
@@ -2028,10 +2028,10 @@ GNUNET_FS_download_signal_suspend_ (void *cls)
2028 if (NULL != dc->parent) 2028 if (NULL != dc->parent)
2029 GNUNET_CONTAINER_DLL_remove (dc->parent->child_head, dc->parent->child_tail, 2029 GNUNET_CONTAINER_DLL_remove (dc->parent->child_head, dc->parent->child_tail,
2030 dc); 2030 dc);
2031 if (GNUNET_SCHEDULER_NO_TASK != dc->task) 2031 if (NULL != dc->task)
2032 { 2032 {
2033 GNUNET_SCHEDULER_cancel (dc->task); 2033 GNUNET_SCHEDULER_cancel (dc->task);
2034 dc->task = GNUNET_SCHEDULER_NO_TASK; 2034 dc->task = NULL;
2035 } 2035 }
2036 pi.status = GNUNET_FS_STATUS_DOWNLOAD_SUSPEND; 2036 pi.status = GNUNET_FS_STATUS_DOWNLOAD_SUSPEND;
2037 GNUNET_FS_download_make_status_ (&pi, dc); 2037 GNUNET_FS_download_make_status_ (&pi, dc);
@@ -2336,10 +2336,10 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete)
2336 2336
2337 if (NULL != dc->top) 2337 if (NULL != dc->top)
2338 GNUNET_FS_end_top (dc->h, dc->top); 2338 GNUNET_FS_end_top (dc->h, dc->top);
2339 if (GNUNET_SCHEDULER_NO_TASK != dc->task) 2339 if (NULL != dc->task)
2340 { 2340 {
2341 GNUNET_SCHEDULER_cancel (dc->task); 2341 GNUNET_SCHEDULER_cancel (dc->task);
2342 dc->task = GNUNET_SCHEDULER_NO_TASK; 2342 dc->task = NULL;
2343 } 2343 }
2344 search_was_null = (NULL == dc->search); 2344 search_was_null = (NULL == dc->search);
2345 if (NULL != dc->search) 2345 if (NULL != dc->search)
diff --git a/src/fs/fs_list_indexed.c b/src/fs/fs_list_indexed.c
index 7a891155e..8c2558745 100644
--- a/src/fs/fs_list_indexed.c
+++ b/src/fs/fs_list_indexed.c
@@ -59,7 +59,7 @@ struct GNUNET_FS_GetIndexedContext
59 /** 59 /**
60 * Continuation to trigger at the end. 60 * Continuation to trigger at the end.
61 */ 61 */
62 GNUNET_SCHEDULER_Task cont; 62 GNUNET_SCHEDULER_TaskCallback cont;
63 63
64 /** 64 /**
65 * Closure for cont. 65 * Closure for cont.
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index a8a9a220f..175e453c6 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -97,7 +97,7 @@ publish_cleanup (struct GNUNET_FS_PublishContext *pc)
97 GNUNET_CLIENT_disconnect (pc->client); 97 GNUNET_CLIENT_disconnect (pc->client);
98 pc->client = NULL; 98 pc->client = NULL;
99 } 99 }
100 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 100 GNUNET_assert (NULL == pc->upload_task);
101 GNUNET_free (pc); 101 GNUNET_free (pc);
102} 102}
103 103
@@ -138,7 +138,7 @@ ds_put_cont (void *cls, int success,
138 GNUNET_FS_unindex_start (pc->h, pc->fi_pos->filename, NULL); 138 GNUNET_FS_unindex_start (pc->h, pc->fi_pos->filename, NULL);
139 } 139 }
140 } 140 }
141 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 141 GNUNET_assert (NULL == pc->upload_task);
142 pc->upload_task = 142 pc->upload_task =
143 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, 143 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
144 &GNUNET_FS_publish_main_, pc); 144 &GNUNET_FS_publish_main_, pc);
@@ -316,7 +316,7 @@ publish_kblocks_cont (void *cls,
316 signal_publish_error (p, pc, emsg); 316 signal_publish_error (p, pc, emsg);
317 GNUNET_FS_file_information_sync_ (p); 317 GNUNET_FS_file_information_sync_ (p);
318 GNUNET_FS_publish_sync_ (pc); 318 GNUNET_FS_publish_sync_ (pc);
319 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 319 GNUNET_assert (NULL == pc->upload_task);
320 pc->upload_task = 320 pc->upload_task =
321 GNUNET_SCHEDULER_add_with_priority 321 GNUNET_SCHEDULER_add_with_priority
322 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, 322 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
@@ -334,7 +334,7 @@ publish_kblocks_cont (void *cls,
334 else 334 else
335 pc->fi_pos = p->dir; 335 pc->fi_pos = p->dir;
336 GNUNET_FS_publish_sync_ (pc); 336 GNUNET_FS_publish_sync_ (pc);
337 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 337 GNUNET_assert (NULL == pc->upload_task);
338 pc->upload_task = 338 pc->upload_task =
339 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, 339 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
340 &GNUNET_FS_publish_main_, pc); 340 &GNUNET_FS_publish_main_, pc);
@@ -449,7 +449,7 @@ encode_cont (void *cls,
449 p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, flen); 449 p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, flen);
450 } 450 }
451 /* continue with main */ /* continue with main */ 451 /* continue with main */ /* continue with main */
452 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 452 GNUNET_assert (NULL == pc->upload_task);
453 pc->upload_task = 453 pc->upload_task =
454 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, 454 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
455 &GNUNET_FS_publish_main_, pc); 455 &GNUNET_FS_publish_main_, pc);
@@ -487,7 +487,7 @@ block_proc (void *cls,
487 if (NULL == pc->dsh) 487 if (NULL == pc->dsh)
488 { 488 {
489 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for datastore connection\n"); 489 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for datastore connection\n");
490 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 490 GNUNET_assert (NULL == pc->upload_task);
491 pc->upload_task = 491 pc->upload_task =
492 GNUNET_SCHEDULER_add_with_priority 492 GNUNET_SCHEDULER_add_with_priority
493 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, pc); 493 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, pc);
@@ -947,7 +947,7 @@ GNUNET_FS_publish_main_ (void *cls,
947 struct GNUNET_FS_FileInformation *p; 947 struct GNUNET_FS_FileInformation *p;
948 char *fn; 948 char *fn;
949 949
950 pc->upload_task = GNUNET_SCHEDULER_NO_TASK; 950 pc->upload_task = NULL;
951 p = pc->fi_pos; 951 p = pc->fi_pos;
952 if (NULL == p) 952 if (NULL == p)
953 { 953 {
@@ -1234,10 +1234,10 @@ GNUNET_FS_publish_signal_suspend_ (void *cls)
1234{ 1234{
1235 struct GNUNET_FS_PublishContext *pc = cls; 1235 struct GNUNET_FS_PublishContext *pc = cls;
1236 1236
1237 if (GNUNET_SCHEDULER_NO_TASK != pc->upload_task) 1237 if (NULL != pc->upload_task)
1238 { 1238 {
1239 GNUNET_SCHEDULER_cancel (pc->upload_task); 1239 GNUNET_SCHEDULER_cancel (pc->upload_task);
1240 pc->upload_task = GNUNET_SCHEDULER_NO_TASK; 1240 pc->upload_task = NULL;
1241 } 1241 }
1242 pc->skip_next_fi_callback = GNUNET_YES; 1242 pc->skip_next_fi_callback = GNUNET_YES;
1243 GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_suspend, pc); 1243 GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_suspend, pc);
@@ -1275,7 +1275,7 @@ finish_reserve (void *cls, int success,
1275 return; 1275 return;
1276 } 1276 }
1277 pc->rid = success; 1277 pc->rid = success;
1278 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); 1278 GNUNET_assert (NULL == pc->upload_task);
1279 pc->upload_task = 1279 pc->upload_task =
1280 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, 1280 GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
1281 &GNUNET_FS_publish_main_, pc); 1281 &GNUNET_FS_publish_main_, pc);
@@ -1373,7 +1373,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
1373 } 1373 }
1374 else 1374 else
1375 { 1375 {
1376 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == ret->upload_task); 1376 GNUNET_assert (NULL == ret->upload_task);
1377 ret->upload_task = 1377 ret->upload_task =
1378 GNUNET_SCHEDULER_add_with_priority 1378 GNUNET_SCHEDULER_add_with_priority
1379 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, ret); 1379 (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, ret);
@@ -1462,10 +1462,10 @@ GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc)
1462 GNUNET_FS_publish_sks_cancel (pc->sks_pc); 1462 GNUNET_FS_publish_sks_cancel (pc->sks_pc);
1463 pc->sks_pc = NULL; 1463 pc->sks_pc = NULL;
1464 } 1464 }
1465 if (GNUNET_SCHEDULER_NO_TASK != pc->upload_task) 1465 if (NULL != pc->upload_task)
1466 { 1466 {
1467 GNUNET_SCHEDULER_cancel (pc->upload_task); 1467 GNUNET_SCHEDULER_cancel (pc->upload_task);
1468 pc->upload_task = GNUNET_SCHEDULER_NO_TASK; 1468 pc->upload_task = NULL;
1469 } 1469 }
1470 pc->skip_next_fi_callback = GNUNET_YES; 1470 pc->skip_next_fi_callback = GNUNET_YES;
1471 GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_stop, pc); 1471 GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_stop, pc);
diff --git a/src/fs/fs_publish_ksk.c b/src/fs/fs_publish_ksk.c
index 67157f408..436bac633 100644
--- a/src/fs/fs_publish_ksk.c
+++ b/src/fs/fs_publish_ksk.c
@@ -74,7 +74,7 @@ struct GNUNET_FS_PublishKskContext
74 /** 74 /**
75 * Current task. 75 * Current task.
76 */ 76 */
77 GNUNET_SCHEDULER_TaskIdentifier ksk_task; 77 struct GNUNET_SCHEDULER_Task * ksk_task;
78 78
79 /** 79 /**
80 * Function to call once we're done. 80 * Function to call once we're done.
@@ -156,7 +156,7 @@ publish_ksk_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
156 struct GNUNET_FS_PublishKskContext *pkc = cls; 156 struct GNUNET_FS_PublishKskContext *pkc = cls;
157 const char *keyword; 157 const char *keyword;
158 158
159 pkc->ksk_task = GNUNET_SCHEDULER_NO_TASK; 159 pkc->ksk_task = NULL;
160 if ( (pkc->i == pkc->ksk_uri->data.ksk.keywordCount) || 160 if ( (pkc->i == pkc->ksk_uri->data.ksk.keywordCount) ||
161 (NULL == pkc->dsh) ) 161 (NULL == pkc->dsh) )
162 { 162 {
@@ -236,10 +236,10 @@ GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h,
236void 236void
237GNUNET_FS_publish_ksk_cancel (struct GNUNET_FS_PublishKskContext *pkc) 237GNUNET_FS_publish_ksk_cancel (struct GNUNET_FS_PublishKskContext *pkc)
238{ 238{
239 if (GNUNET_SCHEDULER_NO_TASK != pkc->ksk_task) 239 if (NULL != pkc->ksk_task)
240 { 240 {
241 GNUNET_SCHEDULER_cancel (pkc->ksk_task); 241 GNUNET_SCHEDULER_cancel (pkc->ksk_task);
242 pkc->ksk_task = GNUNET_SCHEDULER_NO_TASK; 242 pkc->ksk_task = NULL;
243 } 243 }
244 if (NULL != pkc->uc) 244 if (NULL != pkc->uc)
245 { 245 {
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c
index 4399b8c8e..1cba7a4fc 100644
--- a/src/fs/fs_publish_ublock.c
+++ b/src/fs/fs_publish_ublock.c
@@ -112,7 +112,7 @@ struct GNUNET_FS_PublishUblockContext
112 /** 112 /**
113 * Task to run continuation asynchronously. 113 * Task to run continuation asynchronously.
114 */ 114 */
115 GNUNET_SCHEDULER_TaskIdentifier task; 115 struct GNUNET_SCHEDULER_Task * task;
116 116
117}; 117};
118 118
@@ -155,7 +155,7 @@ run_cont (void *cls,
155{ 155{
156 struct GNUNET_FS_PublishUblockContext *uc = cls; 156 struct GNUNET_FS_PublishUblockContext *uc = cls;
157 157
158 uc->task = GNUNET_SCHEDULER_NO_TASK; 158 uc->task = NULL;
159 uc->cont (uc->cont_cls, NULL); 159 uc->cont (uc->cont_cls, NULL);
160 GNUNET_free (uc); 160 GNUNET_free (uc);
161} 161}
@@ -316,7 +316,7 @@ GNUNET_FS_publish_ublock_cancel_ (struct GNUNET_FS_PublishUblockContext *uc)
316{ 316{
317 if (NULL != uc->qre) 317 if (NULL != uc->qre)
318 GNUNET_DATASTORE_cancel (uc->qre); 318 GNUNET_DATASTORE_cancel (uc->qre);
319 if (GNUNET_SCHEDULER_NO_TASK != uc->task) 319 if (NULL != uc->task)
320 GNUNET_SCHEDULER_cancel (uc->task); 320 GNUNET_SCHEDULER_cancel (uc->task);
321 GNUNET_free (uc); 321 GNUNET_free (uc);
322} 322}
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index c85d6d3df..8f640009a 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -223,7 +223,7 @@ probe_failure_handler (void *cls,
223{ 223{
224 struct GNUNET_FS_SearchResult *sr = cls; 224 struct GNUNET_FS_SearchResult *sr = cls;
225 225
226 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 226 sr->probe_cancel_task = NULL;
227 sr->availability_trials++; 227 sr->availability_trials++;
228 GNUNET_FS_download_stop (sr->probe_ctx, GNUNET_YES); 228 GNUNET_FS_download_stop (sr->probe_ctx, GNUNET_YES);
229 sr->probe_ctx = NULL; 229 sr->probe_ctx = NULL;
@@ -249,7 +249,7 @@ probe_success_handler (void *cls,
249{ 249{
250 struct GNUNET_FS_SearchResult *sr = cls; 250 struct GNUNET_FS_SearchResult *sr = cls;
251 251
252 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 252 sr->probe_cancel_task = NULL;
253 sr->availability_trials++; 253 sr->availability_trials++;
254 sr->availability_success++; 254 sr->availability_success++;
255 GNUNET_FS_download_stop (sr->probe_ctx, GNUNET_YES); 255 GNUNET_FS_download_stop (sr->probe_ctx, GNUNET_YES);
@@ -303,34 +303,34 @@ GNUNET_FS_search_probe_progress_ (void *cls,
303 /* ignore */ 303 /* ignore */
304 break; 304 break;
305 case GNUNET_FS_STATUS_DOWNLOAD_ERROR: 305 case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
306 if (GNUNET_SCHEDULER_NO_TASK != sr->probe_cancel_task) 306 if (NULL != sr->probe_cancel_task)
307 { 307 {
308 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task); 308 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task);
309 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 309 sr->probe_cancel_task = NULL;
310 } 310 }
311 sr->probe_cancel_task = 311 sr->probe_cancel_task =
312 GNUNET_SCHEDULER_add_delayed (sr->remaining_probe_time, 312 GNUNET_SCHEDULER_add_delayed (sr->remaining_probe_time,
313 &probe_failure_handler, sr); 313 &probe_failure_handler, sr);
314 break; 314 break;
315 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: 315 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
316 if (GNUNET_SCHEDULER_NO_TASK != sr->probe_cancel_task) 316 if (NULL != sr->probe_cancel_task)
317 { 317 {
318 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task); 318 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task);
319 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 319 sr->probe_cancel_task = NULL;
320 } 320 }
321 sr->probe_cancel_task = 321 sr->probe_cancel_task =
322 GNUNET_SCHEDULER_add_now (&probe_success_handler, sr); 322 GNUNET_SCHEDULER_add_now (&probe_success_handler, sr);
323 break; 323 break;
324 case GNUNET_FS_STATUS_DOWNLOAD_STOPPED: 324 case GNUNET_FS_STATUS_DOWNLOAD_STOPPED:
325 if (GNUNET_SCHEDULER_NO_TASK != sr->probe_cancel_task) 325 if (NULL != sr->probe_cancel_task)
326 { 326 {
327 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task); 327 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task);
328 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 328 sr->probe_cancel_task = NULL;
329 } 329 }
330 sr = NULL; 330 sr = NULL;
331 break; 331 break;
332 case GNUNET_FS_STATUS_DOWNLOAD_ACTIVE: 332 case GNUNET_FS_STATUS_DOWNLOAD_ACTIVE:
333 if (GNUNET_SCHEDULER_NO_TASK == sr->probe_cancel_task) 333 if (NULL == sr->probe_cancel_task)
334 { 334 {
335 sr->probe_active_time = GNUNET_TIME_absolute_get (); 335 sr->probe_active_time = GNUNET_TIME_absolute_get ();
336 sr->probe_cancel_task = 336 sr->probe_cancel_task =
@@ -339,10 +339,10 @@ GNUNET_FS_search_probe_progress_ (void *cls,
339 } 339 }
340 break; 340 break;
341 case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: 341 case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE:
342 if (GNUNET_SCHEDULER_NO_TASK != sr->probe_cancel_task) 342 if (NULL != sr->probe_cancel_task)
343 { 343 {
344 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task); 344 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task);
345 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 345 sr->probe_cancel_task = NULL;
346 } 346 }
347 dur = GNUNET_TIME_absolute_get_duration (sr->probe_active_time); 347 dur = GNUNET_TIME_absolute_get_duration (sr->probe_active_time);
348 sr->remaining_probe_time = 348 sr->remaining_probe_time =
@@ -396,7 +396,7 @@ start_probe_ping_task (struct GNUNET_FS_SearchResult *sr)
396 GNUNET_CONTAINER_DLL_insert (h->probes_head, 396 GNUNET_CONTAINER_DLL_insert (h->probes_head,
397 h->probes_tail, 397 h->probes_tail,
398 sr); 398 sr);
399 if (GNUNET_SCHEDULER_NO_TASK == h->probe_ping_task) 399 if (NULL == h->probe_ping_task)
400 h->probe_ping_task 400 h->probe_ping_task
401 = GNUNET_SCHEDULER_add_now (&probe_ping_task_cb, 401 = GNUNET_SCHEDULER_add_now (&probe_ping_task_cb,
402 h); 402 h);
@@ -419,7 +419,7 @@ GNUNET_FS_stop_probe_ping_task_ (struct GNUNET_FS_SearchResult *sr)
419 if (NULL == h->probes_head) 419 if (NULL == h->probes_head)
420 { 420 {
421 GNUNET_SCHEDULER_cancel (h->probe_ping_task); 421 GNUNET_SCHEDULER_cancel (h->probe_ping_task);
422 h->probe_ping_task = GNUNET_SCHEDULER_NO_TASK; 422 h->probe_ping_task = NULL;
423 } 423 }
424} 424}
425 425
@@ -520,10 +520,10 @@ GNUNET_FS_search_stop_probe_ (struct GNUNET_FS_SearchResult *sr)
520 sr->probe_ctx = NULL; 520 sr->probe_ctx = NULL;
521 GNUNET_FS_stop_probe_ping_task_ (sr); 521 GNUNET_FS_stop_probe_ping_task_ (sr);
522 } 522 }
523 if (GNUNET_SCHEDULER_NO_TASK != sr->probe_cancel_task) 523 if (NULL != sr->probe_cancel_task)
524 { 524 {
525 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task); 525 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task);
526 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 526 sr->probe_cancel_task = NULL;
527 } 527 }
528} 528}
529 529
@@ -1253,7 +1253,7 @@ do_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1253 struct GNUNET_FS_SearchContext *sc = cls; 1253 struct GNUNET_FS_SearchContext *sc = cls;
1254 struct GNUNET_CLIENT_Connection *client; 1254 struct GNUNET_CLIENT_Connection *client;
1255 1255
1256 sc->task = GNUNET_SCHEDULER_NO_TASK; 1256 sc->task = NULL;
1257 client = GNUNET_CLIENT_connect ("fs", sc->h->cfg); 1257 client = GNUNET_CLIENT_connect ("fs", sc->h->cfg);
1258 if (NULL == client) 1258 if (NULL == client)
1259 { 1259 {
@@ -1446,10 +1446,10 @@ search_result_freeze_probes (void *cls,
1446 sr->probe_ctx = NULL; 1446 sr->probe_ctx = NULL;
1447 GNUNET_FS_stop_probe_ping_task_ (sr); 1447 GNUNET_FS_stop_probe_ping_task_ (sr);
1448 } 1448 }
1449 if (GNUNET_SCHEDULER_NO_TASK != sr->probe_cancel_task) 1449 if (NULL != sr->probe_cancel_task)
1450 { 1450 {
1451 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task); 1451 GNUNET_SCHEDULER_cancel (sr->probe_cancel_task);
1452 sr->probe_cancel_task = GNUNET_SCHEDULER_NO_TASK; 1452 sr->probe_cancel_task = NULL;
1453 } 1453 }
1454 if (NULL != sr->update_search) 1454 if (NULL != sr->update_search)
1455 GNUNET_FS_search_pause (sr->update_search); 1455 GNUNET_FS_search_pause (sr->update_search);
@@ -1545,10 +1545,10 @@ GNUNET_FS_search_signal_suspend_ (void *cls)
1545 pi.status = GNUNET_FS_STATUS_SEARCH_SUSPEND; 1545 pi.status = GNUNET_FS_STATUS_SEARCH_SUSPEND;
1546 sc->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc); 1546 sc->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc);
1547 GNUNET_break (NULL == sc->client_info); 1547 GNUNET_break (NULL == sc->client_info);
1548 if (sc->task != GNUNET_SCHEDULER_NO_TASK) 1548 if (sc->task != NULL)
1549 { 1549 {
1550 GNUNET_SCHEDULER_cancel (sc->task); 1550 GNUNET_SCHEDULER_cancel (sc->task);
1551 sc->task = GNUNET_SCHEDULER_NO_TASK; 1551 sc->task = NULL;
1552 } 1552 }
1553 if (NULL != sc->client) 1553 if (NULL != sc->client)
1554 { 1554 {
@@ -1609,10 +1609,10 @@ GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc)
1609{ 1609{
1610 struct GNUNET_FS_ProgressInfo pi; 1610 struct GNUNET_FS_ProgressInfo pi;
1611 1611
1612 if (GNUNET_SCHEDULER_NO_TASK != sc->task) 1612 if (NULL != sc->task)
1613 { 1613 {
1614 GNUNET_SCHEDULER_cancel (sc->task); 1614 GNUNET_SCHEDULER_cancel (sc->task);
1615 sc->task = GNUNET_SCHEDULER_NO_TASK; 1615 sc->task = NULL;
1616 } 1616 }
1617 if (NULL != sc->client) 1617 if (NULL != sc->client)
1618 GNUNET_CLIENT_disconnect (sc->client); 1618 GNUNET_CLIENT_disconnect (sc->client);
@@ -1636,7 +1636,7 @@ GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc)
1636 struct GNUNET_FS_ProgressInfo pi; 1636 struct GNUNET_FS_ProgressInfo pi;
1637 1637
1638 GNUNET_assert (NULL == sc->client); 1638 GNUNET_assert (NULL == sc->client);
1639 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sc->task); 1639 GNUNET_assert (NULL == sc->task);
1640 do_reconnect (sc, NULL); 1640 do_reconnect (sc, NULL);
1641 GNUNET_FS_search_sync_ (sc); 1641 GNUNET_FS_search_sync_ (sc);
1642 pi.status = GNUNET_FS_STATUS_SEARCH_CONTINUED; 1642 pi.status = GNUNET_FS_STATUS_SEARCH_CONTINUED;
@@ -1721,7 +1721,7 @@ search_result_free (void *cls,
1721 GNUNET_assert (NULL == sr->update_search); 1721 GNUNET_assert (NULL == sr->update_search);
1722 } 1722 }
1723 GNUNET_break (NULL == sr->probe_ctx); 1723 GNUNET_break (NULL == sr->probe_ctx);
1724 GNUNET_break (GNUNET_SCHEDULER_NO_TASK == sr->probe_cancel_task); 1724 GNUNET_break (NULL == sr->probe_cancel_task);
1725 GNUNET_break (NULL == sr->client_info); 1725 GNUNET_break (NULL == sr->client_info);
1726 GNUNET_free_non_null (sr->serialization); 1726 GNUNET_free_non_null (sr->serialization);
1727 GNUNET_FS_uri_destroy (sr->uri); 1727 GNUNET_FS_uri_destroy (sr->uri);
@@ -1766,7 +1766,7 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc)
1766 pi.status = GNUNET_FS_STATUS_SEARCH_STOPPED; 1766 pi.status = GNUNET_FS_STATUS_SEARCH_STOPPED;
1767 sc->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc); 1767 sc->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc);
1768 GNUNET_break (NULL == sc->client_info); 1768 GNUNET_break (NULL == sc->client_info);
1769 if (GNUNET_SCHEDULER_NO_TASK != sc->task) 1769 if (NULL != sc->task)
1770 GNUNET_SCHEDULER_cancel (sc->task); 1770 GNUNET_SCHEDULER_cancel (sc->task);
1771 if (NULL != sc->client) 1771 if (NULL != sc->client)
1772 GNUNET_CLIENT_disconnect (sc->client); 1772 GNUNET_CLIENT_disconnect (sc->client);
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c
index 1e098bd60..589f979d6 100644
--- a/src/fs/fs_test_lib.c
+++ b/src/fs/fs_test_lib.c
@@ -63,7 +63,7 @@ struct TestPublishOperation
63 /** 63 /**
64 * Task to abort publishing (timeout). 64 * Task to abort publishing (timeout).
65 */ 65 */
66 GNUNET_SCHEDULER_TaskIdentifier publish_timeout_task; 66 struct GNUNET_SCHEDULER_Task * publish_timeout_task;
67 67
68 /** 68 /**
69 * Seed for file generation. 69 * Seed for file generation.
@@ -131,7 +131,7 @@ struct TestDownloadOperation
131 /** 131 /**
132 * Function to call when download is done. 132 * Function to call when download is done.
133 */ 133 */
134 GNUNET_SCHEDULER_Task download_cont; 134 GNUNET_SCHEDULER_TaskCallback download_cont;
135 135
136 /** 136 /**
137 * Closure for download_cont. 137 * Closure for download_cont.
@@ -146,7 +146,7 @@ struct TestDownloadOperation
146 /** 146 /**
147 * Task to abort downloading (timeout). 147 * Task to abort downloading (timeout).
148 */ 148 */
149 GNUNET_SCHEDULER_TaskIdentifier download_timeout_task; 149 struct GNUNET_SCHEDULER_Task * download_timeout_task;
150 150
151 /** 151 /**
152 * Context for current download operation. 152 * Context for current download operation.
@@ -215,7 +215,7 @@ publish_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
215{ 215{
216 struct TestPublishOperation *po = cls; 216 struct TestPublishOperation *po = cls;
217 217
218 po->publish_timeout_task = GNUNET_SCHEDULER_NO_TASK; 218 po->publish_timeout_task = NULL;
219 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 219 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
220 "Timeout while trying to publish data\n"); 220 "Timeout while trying to publish data\n");
221 GNUNET_TESTBED_operation_done (po->fs_op); 221 GNUNET_TESTBED_operation_done (po->fs_op);
@@ -242,7 +242,7 @@ publish_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
242 { 242 {
243 case GNUNET_FS_STATUS_PUBLISH_COMPLETED: 243 case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
244 GNUNET_SCHEDULER_cancel (po->publish_timeout_task); 244 GNUNET_SCHEDULER_cancel (po->publish_timeout_task);
245 po->publish_timeout_task = GNUNET_SCHEDULER_NO_TASK; 245 po->publish_timeout_task = NULL;
246 po->publish_uri = 246 po->publish_uri =
247 GNUNET_FS_uri_dup (info->value.publish.specifics.completed.chk_uri); 247 GNUNET_FS_uri_dup (info->value.publish.specifics.completed.chk_uri);
248 GNUNET_SCHEDULER_add_continuation (&report_uri, po, 248 GNUNET_SCHEDULER_add_continuation (&report_uri, po,
@@ -489,7 +489,7 @@ download_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
489 489
490 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 490 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
491 "Timeout while trying to download file\n"); 491 "Timeout while trying to download file\n");
492 dop->download_timeout_task = GNUNET_SCHEDULER_NO_TASK; 492 dop->download_timeout_task = NULL;
493 GNUNET_FS_download_stop (dop->download_context, GNUNET_YES); 493 GNUNET_FS_download_stop (dop->download_context, GNUNET_YES);
494 GNUNET_SCHEDULER_add_continuation (dop->download_cont, 494 GNUNET_SCHEDULER_add_continuation (dop->download_cont,
495 dop->download_cont_cls, 495 dop->download_cont_cls,
@@ -543,7 +543,7 @@ download_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
543 break; 543 break;
544 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: 544 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
545 GNUNET_SCHEDULER_cancel (dop->download_timeout_task); 545 GNUNET_SCHEDULER_cancel (dop->download_timeout_task);
546 dop->download_timeout_task = GNUNET_SCHEDULER_NO_TASK; 546 dop->download_timeout_task = NULL;
547 GNUNET_SCHEDULER_add_continuation (&report_success, dop, 547 GNUNET_SCHEDULER_add_continuation (&report_success, dop,
548 GNUNET_SCHEDULER_REASON_PREREQ_DONE); 548 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
549 break; 549 break;
@@ -627,7 +627,7 @@ GNUNET_FS_TEST_download (struct GNUNET_TESTBED_Peer *peer,
627 struct GNUNET_TIME_Relative timeout, 627 struct GNUNET_TIME_Relative timeout,
628 uint32_t anonymity, uint32_t seed, 628 uint32_t anonymity, uint32_t seed,
629 const struct GNUNET_FS_Uri *uri, unsigned int verbose, 629 const struct GNUNET_FS_Uri *uri, unsigned int verbose,
630 GNUNET_SCHEDULER_Task cont, void *cont_cls) 630 GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
631{ 631{
632 struct TestDownloadOperation *dop; 632 struct TestDownloadOperation *dop;
633 633
diff --git a/src/fs/fs_test_lib.h b/src/fs/fs_test_lib.h
index 679e0745c..112ff3893 100644
--- a/src/fs/fs_test_lib.h
+++ b/src/fs/fs_test_lib.h
@@ -89,7 +89,7 @@ GNUNET_FS_TEST_download (struct GNUNET_TESTBED_Peer *peer,
89 struct GNUNET_TIME_Relative timeout, 89 struct GNUNET_TIME_Relative timeout,
90 uint32_t anonymity, uint32_t seed, 90 uint32_t anonymity, uint32_t seed,
91 const struct GNUNET_FS_Uri *uri, unsigned int verbose, 91 const struct GNUNET_FS_Uri *uri, unsigned int verbose,
92 GNUNET_SCHEDULER_Task cont, void *cont_cls); 92 GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls);
93 93
94 94
95 95
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index 5dc39e4e6..715ecddb1 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -63,7 +63,7 @@ struct GNUNET_FS_TreeEncoder
63 /** 63 /**
64 * Function to call once we're done with processing. 64 * Function to call once we're done with processing.
65 */ 65 */
66 GNUNET_SCHEDULER_Task cont; 66 GNUNET_SCHEDULER_TaskCallback cont;
67 67
68 /** 68 /**
69 * Set to an error message (if we had an error). 69 * Set to an error message (if we had an error).
@@ -272,7 +272,7 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size,
272 GNUNET_FS_DataReader reader, 272 GNUNET_FS_DataReader reader,
273 GNUNET_FS_TreeBlockProcessor proc, 273 GNUNET_FS_TreeBlockProcessor proc,
274 GNUNET_FS_TreeProgressCallback progress, 274 GNUNET_FS_TreeProgressCallback progress,
275 GNUNET_SCHEDULER_Task cont) 275 GNUNET_SCHEDULER_TaskCallback cont)
276{ 276{
277 struct GNUNET_FS_TreeEncoder *te; 277 struct GNUNET_FS_TreeEncoder *te;
278 278
diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h
index cd25a6dd1..2aef80b85 100644
--- a/src/fs/fs_tree.h
+++ b/src/fs/fs_tree.h
@@ -142,7 +142,7 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size,
142 void *cls, GNUNET_FS_DataReader reader, 142 void *cls, GNUNET_FS_DataReader reader,
143 GNUNET_FS_TreeBlockProcessor proc, 143 GNUNET_FS_TreeBlockProcessor proc,
144 GNUNET_FS_TreeProgressCallback progress, 144 GNUNET_FS_TreeProgressCallback progress,
145 GNUNET_SCHEDULER_Task cont); 145 GNUNET_SCHEDULER_TaskCallback cont);
146 146
147 147
148/** 148/**
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c
index 32725f66f..c3b19b9ed 100644
--- a/src/fs/gnunet-auto-share.c
+++ b/src/fs/gnunet-auto-share.c
@@ -97,12 +97,12 @@ static int do_disable_creation_time;
97/** 97/**
98 * Handle for the 'shutdown' task. 98 * Handle for the 'shutdown' task.
99 */ 99 */
100static GNUNET_SCHEDULER_TaskIdentifier kill_task; 100static struct GNUNET_SCHEDULER_Task * kill_task;
101 101
102/** 102/**
103 * Handle for the main task that does scanning and working. 103 * Handle for the main task that does scanning and working.
104 */ 104 */
105static GNUNET_SCHEDULER_TaskIdentifier run_task; 105static struct GNUNET_SCHEDULER_Task * run_task;
106 106
107/** 107/**
108 * Anonymity level option to use for publishing. 108 * Anonymity level option to use for publishing.
@@ -322,17 +322,17 @@ save_state ()
322static void 322static void
323do_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 323do_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
324{ 324{
325 kill_task = GNUNET_SCHEDULER_NO_TASK; 325 kill_task = NULL;
326 do_shutdown = GNUNET_YES; 326 do_shutdown = GNUNET_YES;
327 if (NULL != publish_proc) 327 if (NULL != publish_proc)
328 { 328 {
329 GNUNET_OS_process_kill (publish_proc, SIGKILL); 329 GNUNET_OS_process_kill (publish_proc, SIGKILL);
330 return; 330 return;
331 } 331 }
332 if (GNUNET_SCHEDULER_NO_TASK != run_task) 332 if (NULL != run_task)
333 { 333 {
334 GNUNET_SCHEDULER_cancel (run_task); 334 GNUNET_SCHEDULER_cancel (run_task);
335 run_task = GNUNET_SCHEDULER_NO_TASK; 335 run_task = NULL;
336 } 336 }
337} 337}
338 338
@@ -363,7 +363,7 @@ maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
363 const struct GNUNET_DISK_FileHandle *pr; 363 const struct GNUNET_DISK_FileHandle *pr;
364 364
365 365
366 run_task = GNUNET_SCHEDULER_NO_TASK; 366 run_task = NULL;
367 pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ); 367 pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ);
368 if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) 368 if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY))
369 { 369 {
@@ -457,7 +457,7 @@ work (void *cls,
457 const struct GNUNET_DISK_FileHandle *pr; 457 const struct GNUNET_DISK_FileHandle *pr;
458 int argc; 458 int argc;
459 459
460 run_task = GNUNET_SCHEDULER_NO_TASK; 460 run_task = NULL;
461 wi = work_head; 461 wi = work_head;
462 GNUNET_CONTAINER_DLL_remove (work_head, 462 GNUNET_CONTAINER_DLL_remove (work_head,
463 work_tail, 463 work_tail,
@@ -629,7 +629,7 @@ add_file (void *cls,
629static void 629static void
630scan (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 630scan (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
631{ 631{
632 run_task = GNUNET_SCHEDULER_NO_TASK; 632 run_task = NULL;
633 start_time = GNUNET_TIME_absolute_get (); 633 start_time = GNUNET_TIME_absolute_get ();
634 (void) GNUNET_DISK_directory_scan (dir_name, 634 (void) GNUNET_DISK_directory_scan (dir_name,
635 &add_file, 635 &add_file,
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c
index 1549972a1..9c4f28351 100644
--- a/src/fs/gnunet-daemon-fsprofiler.c
+++ b/src/fs/gnunet-daemon-fsprofiler.c
@@ -69,12 +69,12 @@ struct Pattern
69 /** 69 /**
70 * Task to run the operation. 70 * Task to run the operation.
71 */ 71 */
72 GNUNET_SCHEDULER_TaskIdentifier task; 72 struct GNUNET_SCHEDULER_Task * task;
73 73
74 /** 74 /**
75 * Secondary task to run the operation. 75 * Secondary task to run the operation.
76 */ 76 */
77 GNUNET_SCHEDULER_TaskIdentifier stask; 77 struct GNUNET_SCHEDULER_Task * stask;
78 78
79 /** 79 /**
80 * X-value. 80 * X-value.
@@ -276,7 +276,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
276 276
277 while (NULL != (p = publish_head)) 277 while (NULL != (p = publish_head))
278 { 278 {
279 if (GNUNET_SCHEDULER_NO_TASK != p->task) 279 if (NULL != p->task)
280 GNUNET_SCHEDULER_cancel (p->task); 280 GNUNET_SCHEDULER_cancel (p->task);
281 if (NULL != p->ctx) 281 if (NULL != p->ctx)
282 GNUNET_FS_publish_stop (p->ctx); 282 GNUNET_FS_publish_stop (p->ctx);
@@ -285,9 +285,9 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
285 } 285 }
286 while (NULL != (p = download_head)) 286 while (NULL != (p = download_head))
287 { 287 {
288 if (GNUNET_SCHEDULER_NO_TASK != p->task) 288 if (NULL != p->task)
289 GNUNET_SCHEDULER_cancel (p->task); 289 GNUNET_SCHEDULER_cancel (p->task);
290 if (GNUNET_SCHEDULER_NO_TASK != p->stask) 290 if (NULL != p->stask)
291 GNUNET_SCHEDULER_cancel (p->stask); 291 GNUNET_SCHEDULER_cancel (p->stask);
292 if (NULL != p->ctx) 292 if (NULL != p->ctx)
293 GNUNET_FS_download_stop (p->ctx, GNUNET_YES); 293 GNUNET_FS_download_stop (p->ctx, GNUNET_YES);
@@ -320,7 +320,7 @@ publish_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
320{ 320{
321 struct Pattern *p = cls; 321 struct Pattern *p = cls;
322 322
323 p->task = GNUNET_SCHEDULER_NO_TASK; 323 p->task = NULL;
324 GNUNET_FS_publish_stop (p->ctx); 324 GNUNET_FS_publish_stop (p->ctx);
325} 325}
326 326
@@ -336,7 +336,7 @@ download_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
336{ 336{
337 struct Pattern *p = cls; 337 struct Pattern *p = cls;
338 338
339 p->task = GNUNET_SCHEDULER_NO_TASK; 339 p->task = NULL;
340 GNUNET_FS_download_stop (p->ctx, GNUNET_YES); 340 GNUNET_FS_download_stop (p->ctx, GNUNET_YES);
341} 341}
342 342
@@ -352,7 +352,7 @@ search_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
352{ 352{
353 struct Pattern *p = cls; 353 struct Pattern *p = cls;
354 354
355 p->stask = GNUNET_SCHEDULER_NO_TASK; 355 p->stask = NULL;
356 GNUNET_FS_search_stop (p->sctx); 356 GNUNET_FS_search_stop (p->sctx);
357} 357}
358 358
@@ -507,7 +507,7 @@ start_publish (void *cls,
507 struct Pattern *p = cls; 507 struct Pattern *p = cls;
508 struct GNUNET_FS_FileInformation *fi; 508 struct GNUNET_FS_FileInformation *fi;
509 509
510 p->task = GNUNET_SCHEDULER_NO_TASK; 510 p->task = NULL;
511 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 511 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
512 return; 512 return;
513 fi = make_file (p->x, p->y, p); 513 fi = make_file (p->x, p->y, p);
@@ -532,7 +532,7 @@ start_download (void *cls,
532 struct Pattern *p = cls; 532 struct Pattern *p = cls;
533 struct GNUNET_FS_Uri *keywords; 533 struct GNUNET_FS_Uri *keywords;
534 534
535 p->task = GNUNET_SCHEDULER_NO_TASK; 535 p->task = NULL;
536 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 536 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
537 return; 537 return;
538 keywords = make_keywords (p->x); 538 keywords = make_keywords (p->x);
diff --git a/src/fs/gnunet-fs-profiler.c b/src/fs/gnunet-fs-profiler.c
index 56a3084cc..ba081f7cf 100644
--- a/src/fs/gnunet-fs-profiler.c
+++ b/src/fs/gnunet-fs-profiler.c
@@ -50,7 +50,7 @@ static struct GNUNET_TIME_Relative timeout;
50/** 50/**
51 * Handle to the task run during termination. 51 * Handle to the task run during termination.
52 */ 52 */
53static GNUNET_SCHEDULER_TaskIdentifier terminate_taskid; 53static struct GNUNET_SCHEDULER_Task * terminate_taskid;
54 54
55 55
56/** 56/**
@@ -115,7 +115,7 @@ static void
115terminate_task (void *cls, 115terminate_task (void *cls,
116 const struct GNUNET_SCHEDULER_TaskContext *tc) 116 const struct GNUNET_SCHEDULER_TaskContext *tc)
117{ 117{
118 terminate_taskid = GNUNET_SCHEDULER_NO_TASK; 118 terminate_taskid = NULL;
119 GNUNET_TESTBED_get_statistics (0, NULL, 119 GNUNET_TESTBED_get_statistics (0, NULL,
120 NULL, NULL, 120 NULL, NULL,
121 &process_stats, 121 &process_stats,
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index ceed3109f..2ec50b14d 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -127,7 +127,7 @@ static int do_disable_creation_time;
127/** 127/**
128 * Task run on CTRL-C to kill everything nicely. 128 * Task run on CTRL-C to kill everything nicely.
129 */ 129 */
130static GNUNET_SCHEDULER_TaskIdentifier kill_task; 130static struct GNUNET_SCHEDULER_Task * kill_task;
131 131
132/** 132/**
133 * Handle to the directory scanner (for recursive insertions). 133 * Handle to the directory scanner (for recursive insertions).
@@ -159,7 +159,7 @@ do_stop_task (void *cls,
159{ 159{
160 struct GNUNET_FS_PublishContext *p; 160 struct GNUNET_FS_PublishContext *p;
161 161
162 kill_task = GNUNET_SCHEDULER_NO_TASK; 162 kill_task = NULL;
163 if (NULL != identity) 163 if (NULL != identity)
164 { 164 {
165 GNUNET_IDENTITY_disconnect (identity); 165 GNUNET_IDENTITY_disconnect (identity);
@@ -188,7 +188,7 @@ do_stop_task (void *cls,
188static void 188static void
189stop_scanner_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 189stop_scanner_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
190{ 190{
191 kill_task = GNUNET_SCHEDULER_NO_TASK; 191 kill_task = NULL;
192 if (NULL != ds) 192 if (NULL != ds)
193 { 193 {
194 GNUNET_FS_directory_scan_abort (ds); 194 GNUNET_FS_directory_scan_abort (ds);
@@ -256,10 +256,10 @@ progress_cb (void *cls,
256 case GNUNET_FS_STATUS_PUBLISH_ERROR: 256 case GNUNET_FS_STATUS_PUBLISH_ERROR:
257 FPRINTF (stderr, _("Error publishing: %s.\n"), 257 FPRINTF (stderr, _("Error publishing: %s.\n"),
258 info->value.publish.specifics.error.message); 258 info->value.publish.specifics.error.message);
259 if (kill_task != GNUNET_SCHEDULER_NO_TASK) 259 if (kill_task != NULL)
260 { 260 {
261 GNUNET_SCHEDULER_cancel (kill_task); 261 GNUNET_SCHEDULER_cancel (kill_task);
262 kill_task = GNUNET_SCHEDULER_NO_TASK; 262 kill_task = NULL;
263 } 263 }
264 kill_task = GNUNET_SCHEDULER_add_now (&do_stop_task, NULL); 264 kill_task = GNUNET_SCHEDULER_add_now (&do_stop_task, NULL);
265 break; 265 break;
@@ -284,7 +284,7 @@ progress_cb (void *cls,
284 } 284 }
285 if (NULL == info->value.publish.pctx) 285 if (NULL == info->value.publish.pctx)
286 { 286 {
287 if (GNUNET_SCHEDULER_NO_TASK != kill_task) 287 if (NULL != kill_task)
288 GNUNET_SCHEDULER_cancel (kill_task); 288 GNUNET_SCHEDULER_cancel (kill_task);
289 kill_task = GNUNET_SCHEDULER_add_now (&do_stop_task, NULL); 289 kill_task = GNUNET_SCHEDULER_add_now (&do_stop_task, NULL);
290 } 290 }
@@ -669,10 +669,10 @@ directory_scan_cb (void *cls,
669 FPRINTF (stdout, 669 FPRINTF (stdout,
670 "%s", 670 "%s",
671 _("Internal error scanning directory.\n")); 671 _("Internal error scanning directory.\n"));
672 if (kill_task != GNUNET_SCHEDULER_NO_TASK) 672 if (kill_task != NULL)
673 { 673 {
674 GNUNET_SCHEDULER_cancel (kill_task); 674 GNUNET_SCHEDULER_cancel (kill_task);
675 kill_task = GNUNET_SCHEDULER_NO_TASK; 675 kill_task = NULL;
676 } 676 }
677 kill_task = GNUNET_SCHEDULER_add_now (&stop_scanner_task, NULL); 677 kill_task = GNUNET_SCHEDULER_add_now (&stop_scanner_task, NULL);
678 break; 678 break;
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 7c8833ce8..4d33626c2 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -167,7 +167,7 @@ static struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
167/** 167/**
168 * ID of our task that we use to age the cover counters. 168 * ID of our task that we use to age the cover counters.
169 */ 169 */
170static GNUNET_SCHEDULER_TaskIdentifier cover_age_task; 170static struct GNUNET_SCHEDULER_Task * cover_age_task;
171 171
172/** 172/**
173 * Datastore 'GET' load tracking. 173 * Datastore 'GET' load tracking.
@@ -569,10 +569,10 @@ shutdown_task (void *cls,
569 block_cfg = NULL; 569 block_cfg = NULL;
570 GNUNET_STATISTICS_destroy (GSF_stats, GNUNET_NO); 570 GNUNET_STATISTICS_destroy (GSF_stats, GNUNET_NO);
571 GSF_stats = NULL; 571 GSF_stats = NULL;
572 if (GNUNET_SCHEDULER_NO_TASK != cover_age_task) 572 if (NULL != cover_age_task)
573 { 573 {
574 GNUNET_SCHEDULER_cancel (cover_age_task); 574 GNUNET_SCHEDULER_cancel (cover_age_task);
575 cover_age_task = GNUNET_SCHEDULER_NO_TASK; 575 cover_age_task = NULL;
576 } 576 }
577 GNUNET_FS_indexing_done (); 577 GNUNET_FS_indexing_done ();
578 GNUNET_LOAD_value_free (datastore_get_load); 578 GNUNET_LOAD_value_free (datastore_get_load);
diff --git a/src/fs/gnunet-service-fs_cadet_client.c b/src/fs/gnunet-service-fs_cadet_client.c
index f0905e6c3..88014f204 100644
--- a/src/fs/gnunet-service-fs_cadet_client.c
+++ b/src/fs/gnunet-service-fs_cadet_client.c
@@ -140,14 +140,14 @@ struct CadetHandle
140 * a few seconds to give the application a chance to give 140 * a few seconds to give the application a chance to give
141 * us another query). 141 * us another query).
142 */ 142 */
143 GNUNET_SCHEDULER_TaskIdentifier timeout_task; 143 struct GNUNET_SCHEDULER_Task * timeout_task;
144 144
145 /** 145 /**
146 * Task to reset cadets that had errors (asynchronously, 146 * Task to reset cadets that had errors (asynchronously,
147 * as we may not be able to do it immediately during a 147 * as we may not be able to do it immediately during a
148 * callback from the cadet API). 148 * callback from the cadet API).
149 */ 149 */
150 GNUNET_SCHEDULER_TaskIdentifier reset_task; 150 struct GNUNET_SCHEDULER_Task * reset_task;
151 151
152}; 152};
153 153
@@ -258,7 +258,7 @@ cadet_timeout (void *cls,
258 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 258 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
259 "Timeout on cadet channel to %s\n", 259 "Timeout on cadet channel to %s\n",
260 GNUNET_i2s (&mh->target)); 260 GNUNET_i2s (&mh->target));
261 mh->timeout_task = GNUNET_SCHEDULER_NO_TASK; 261 mh->timeout_task = NULL;
262 tun = mh->channel; 262 tun = mh->channel;
263 mh->channel = NULL; 263 mh->channel = NULL;
264 if(NULL != tun) 264 if(NULL != tun)
@@ -278,7 +278,7 @@ reset_cadet_task (void *cls,
278{ 278{
279 struct CadetHandle *mh = cls; 279 struct CadetHandle *mh = cls;
280 280
281 mh->reset_task = GNUNET_SCHEDULER_NO_TASK; 281 mh->reset_task = NULL;
282 reset_cadet (mh); 282 reset_cadet (mh);
283} 283}
284 284
@@ -292,7 +292,7 @@ reset_cadet_task (void *cls,
292static void 292static void
293reset_cadet_async (struct CadetHandle *mh) 293reset_cadet_async (struct CadetHandle *mh)
294{ 294{
295 if (GNUNET_SCHEDULER_NO_TASK != mh->reset_task) 295 if (NULL != mh->reset_task)
296 GNUNET_SCHEDULER_cancel (mh->reset_task); 296 GNUNET_SCHEDULER_cancel (mh->reset_task);
297 mh->reset_task = GNUNET_SCHEDULER_add_now (&reset_cadet_task, 297 mh->reset_task = GNUNET_SCHEDULER_add_now (&reset_cadet_task,
298 mh); 298 mh);
@@ -527,10 +527,10 @@ get_cadet (const struct GNUNET_PeerIdentity *target)
527 target); 527 target);
528 if (NULL != mh) 528 if (NULL != mh)
529 { 529 {
530 if (GNUNET_SCHEDULER_NO_TASK != mh->timeout_task) 530 if (NULL != mh->timeout_task)
531 { 531 {
532 GNUNET_SCHEDULER_cancel (mh->timeout_task); 532 GNUNET_SCHEDULER_cancel (mh->timeout_task);
533 mh->timeout_task = GNUNET_SCHEDULER_NO_TASK; 533 mh->timeout_task = NULL;
534 } 534 }
535 return mh; 535 return mh;
536 } 536 }
@@ -698,9 +698,9 @@ cleaner_cb (void *cls,
698 mh); 698 mh);
699 if (NULL != mh->wh) 699 if (NULL != mh->wh)
700 GNUNET_CADET_notify_transmit_ready_cancel (mh->wh); 700 GNUNET_CADET_notify_transmit_ready_cancel (mh->wh);
701 if (GNUNET_SCHEDULER_NO_TASK != mh->timeout_task) 701 if (NULL != mh->timeout_task)
702 GNUNET_SCHEDULER_cancel (mh->timeout_task); 702 GNUNET_SCHEDULER_cancel (mh->timeout_task);
703 if (GNUNET_SCHEDULER_NO_TASK != mh->reset_task) 703 if (NULL != mh->reset_task)
704 GNUNET_SCHEDULER_cancel (mh->reset_task); 704 GNUNET_SCHEDULER_cancel (mh->reset_task);
705 GNUNET_assert (0 == 705 GNUNET_assert (0 ==
706 GNUNET_CONTAINER_multihashmap_size (mh->waiting_map)); 706 GNUNET_CONTAINER_multihashmap_size (mh->waiting_map));
diff --git a/src/fs/gnunet-service-fs_cadet_server.c b/src/fs/gnunet-service-fs_cadet_server.c
index 6ce18afb5..74251e4b7 100644
--- a/src/fs/gnunet-service-fs_cadet_server.c
+++ b/src/fs/gnunet-service-fs_cadet_server.c
@@ -108,12 +108,12 @@ struct CadetClient
108 /** 108 /**
109 * Task that is scheduled to asynchronously terminate the connection. 109 * Task that is scheduled to asynchronously terminate the connection.
110 */ 110 */
111 GNUNET_SCHEDULER_TaskIdentifier terminate_task; 111 struct GNUNET_SCHEDULER_Task * terminate_task;
112 112
113 /** 113 /**
114 * Task that is scheduled to terminate idle connections. 114 * Task that is scheduled to terminate idle connections.
115 */ 115 */
116 GNUNET_SCHEDULER_TaskIdentifier timeout_task; 116 struct GNUNET_SCHEDULER_Task * timeout_task;
117 117
118 /** 118 /**
119 * Size of the last write that was initiated. 119 * Size of the last write that was initiated.
@@ -163,7 +163,7 @@ timeout_cadet_task (void *cls,
163 struct CadetClient *sc = cls; 163 struct CadetClient *sc = cls;
164 struct GNUNET_CADET_Channel *tun; 164 struct GNUNET_CADET_Channel *tun;
165 165
166 sc->timeout_task = GNUNET_SCHEDULER_NO_TASK; 166 sc->timeout_task = NULL;
167 tun = sc->channel; 167 tun = sc->channel;
168 sc->channel = NULL; 168 sc->channel = NULL;
169 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 169 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -181,7 +181,7 @@ timeout_cadet_task (void *cls,
181static void 181static void
182refresh_timeout_task (struct CadetClient *sc) 182refresh_timeout_task (struct CadetClient *sc)
183{ 183{
184 if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task) 184 if (NULL != sc->timeout_task)
185 GNUNET_SCHEDULER_cancel (sc->timeout_task); 185 GNUNET_SCHEDULER_cancel (sc->timeout_task);
186 sc->timeout_task = GNUNET_SCHEDULER_add_delayed (IDLE_TIMEOUT, 186 sc->timeout_task = GNUNET_SCHEDULER_add_delayed (IDLE_TIMEOUT,
187 &timeout_cadet_task, 187 &timeout_cadet_task,
@@ -530,9 +530,9 @@ cleaner_cb (void *cls,
530 GNUNET_STATISTICS_update (GSF_stats, 530 GNUNET_STATISTICS_update (GSF_stats,
531 gettext_noop ("# cadet connections active"), -1, 531 gettext_noop ("# cadet connections active"), -1,
532 GNUNET_NO); 532 GNUNET_NO);
533 if (GNUNET_SCHEDULER_NO_TASK != sc->terminate_task) 533 if (NULL != sc->terminate_task)
534 GNUNET_SCHEDULER_cancel (sc->terminate_task); 534 GNUNET_SCHEDULER_cancel (sc->terminate_task);
535 if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task) 535 if (NULL != sc->timeout_task)
536 GNUNET_SCHEDULER_cancel (sc->timeout_task); 536 GNUNET_SCHEDULER_cancel (sc->timeout_task);
537 if (NULL != sc->wh) 537 if (NULL != sc->wh)
538 GNUNET_CADET_notify_transmit_ready_cancel (sc->wh); 538 GNUNET_CADET_notify_transmit_ready_cancel (sc->wh);
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index 030d8b643..8c956c274 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -86,7 +86,7 @@ struct GSF_PeerTransmitHandle
86 /** 86 /**
87 * Task called on timeout, or 0 for none. 87 * Task called on timeout, or 0 for none.
88 */ 88 */
89 GNUNET_SCHEDULER_TaskIdentifier timeout_task; 89 struct GNUNET_SCHEDULER_Task * timeout_task;
90 90
91 /** 91 /**
92 * Function to call to get the actual message. 92 * Function to call to get the actual message.
@@ -155,7 +155,7 @@ struct GSF_DelayedHandle
155 /** 155 /**
156 * Task for the delay. 156 * Task for the delay.
157 */ 157 */
158 GNUNET_SCHEDULER_TaskIdentifier delay_task; 158 struct GNUNET_SCHEDULER_Task * delay_task;
159 159
160 /** 160 /**
161 * Size of the message. 161 * Size of the message.
@@ -184,7 +184,7 @@ struct PeerRequest
184 /** 184 /**
185 * Task for asynchronous stopping of this request. 185 * Task for asynchronous stopping of this request.
186 */ 186 */
187 GNUNET_SCHEDULER_TaskIdentifier kill_task; 187 struct GNUNET_SCHEDULER_Task * kill_task;
188 188
189}; 189};
190 190
@@ -209,7 +209,7 @@ struct GSF_ConnectedPeer
209 /** 209 /**
210 * Task scheduled to revive migration to this peer. 210 * Task scheduled to revive migration to this peer.
211 */ 211 */
212 GNUNET_SCHEDULER_TaskIdentifier mig_revive_task; 212 struct GNUNET_SCHEDULER_Task * mig_revive_task;
213 213
214 /** 214 /**
215 * Messages (replies, queries, content migration) we would like to 215 * Messages (replies, queries, content migration) we would like to
@@ -248,7 +248,7 @@ struct GSF_ConnectedPeer
248 /** 248 /**
249 * Task scheduled if we need to retry bandwidth reservation later. 249 * Task scheduled if we need to retry bandwidth reservation later.
250 */ 250 */
251 GNUNET_SCHEDULER_TaskIdentifier rc_delay_task; 251 struct GNUNET_SCHEDULER_Task * rc_delay_task;
252 252
253 /** 253 /**
254 * Active requests from this neighbour, map of query to 'struct PeerRequest'. 254 * Active requests from this neighbour, map of query to 'struct PeerRequest'.
@@ -472,10 +472,10 @@ peer_transmit_ready_cb (void *cls, size_t size, void *buf)
472 schedule_transmission (pth); 472 schedule_transmission (pth);
473 return 0; 473 return 0;
474 } 474 }
475 if (GNUNET_SCHEDULER_NO_TASK != pth->timeout_task) 475 if (NULL != pth->timeout_task)
476 { 476 {
477 GNUNET_SCHEDULER_cancel (pth->timeout_task); 477 GNUNET_SCHEDULER_cancel (pth->timeout_task);
478 pth->timeout_task = GNUNET_SCHEDULER_NO_TASK; 478 pth->timeout_task = NULL;
479 } 479 }
480 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth); 480 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth);
481 if (GNUNET_YES == pth->is_query) 481 if (GNUNET_YES == pth->is_query)
@@ -516,7 +516,7 @@ retry_reservation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
516 struct GNUNET_PeerIdentity target; 516 struct GNUNET_PeerIdentity target;
517 517
518 GNUNET_PEER_resolve (cp->ppd.pid, &target); 518 GNUNET_PEER_resolve (cp->ppd.pid, &target);
519 cp->rc_delay_task = GNUNET_SCHEDULER_NO_TASK; 519 cp->rc_delay_task = NULL;
520 cp->rc = 520 cp->rc =
521 GNUNET_ATS_reserve_bandwidth (GSF_ats, &target, DBLOCK_SIZE, 521 GNUNET_ATS_reserve_bandwidth (GSF_ats, &target, DBLOCK_SIZE,
522 &ats_reserve_callback, cp); 522 &ats_reserve_callback, cp);
@@ -652,7 +652,7 @@ revive_migration (void *cls,
652 struct GSF_ConnectedPeer *cp = cls; 652 struct GSF_ConnectedPeer *cp = cls;
653 struct GNUNET_TIME_Relative bt; 653 struct GNUNET_TIME_Relative bt;
654 654
655 cp->mig_revive_task = GNUNET_SCHEDULER_NO_TASK; 655 cp->mig_revive_task = NULL;
656 bt = GNUNET_TIME_absolute_get_remaining (cp->ppd.migration_blocked_until); 656 bt = GNUNET_TIME_absolute_get_remaining (cp->ppd.migration_blocked_until);
657 if (0 != bt.rel_value_us) 657 if (0 != bt.rel_value_us)
658 { 658 {
@@ -715,7 +715,7 @@ GSF_handle_p2p_migration_stop_ (void *cls,
715 GNUNET_i2s (other), 715 GNUNET_i2s (other),
716 GNUNET_STRINGS_relative_time_to_string (bt, GNUNET_YES)); 716 GNUNET_STRINGS_relative_time_to_string (bt, GNUNET_YES));
717 cp->ppd.migration_blocked_until = GNUNET_TIME_relative_to_absolute (bt); 717 cp->ppd.migration_blocked_until = GNUNET_TIME_relative_to_absolute (bt);
718 if (GNUNET_SCHEDULER_NO_TASK == cp->mig_revive_task) 718 if (NULL == cp->mig_revive_task)
719 { 719 {
720 GSF_push_stop_ (cp); 720 GSF_push_stop_ (cp);
721 cp->mig_revive_task = 721 cp->mig_revive_task =
@@ -773,10 +773,10 @@ free_pending_request (struct PeerRequest *peerreq,
773{ 773{
774 struct GSF_ConnectedPeer *cp = peerreq->cp; 774 struct GSF_ConnectedPeer *cp = peerreq->cp;
775 775
776 if (GNUNET_SCHEDULER_NO_TASK != peerreq->kill_task) 776 if (NULL != peerreq->kill_task)
777 { 777 {
778 GNUNET_SCHEDULER_cancel (peerreq->kill_task); 778 GNUNET_SCHEDULER_cancel (peerreq->kill_task);
779 peerreq->kill_task = GNUNET_SCHEDULER_NO_TASK; 779 peerreq->kill_task = NULL;
780 } 780 }
781 GNUNET_STATISTICS_update (GSF_stats, gettext_noop ("# P2P searches active"), 781 GNUNET_STATISTICS_update (GSF_stats, gettext_noop ("# P2P searches active"),
782 -1, GNUNET_NO); 782 -1, GNUNET_NO);
@@ -825,7 +825,7 @@ peer_request_destroy (void *cls,
825 struct GSF_PendingRequest *pr = peerreq->pr; 825 struct GSF_PendingRequest *pr = peerreq->pr;
826 struct GSF_PendingRequestData *prd; 826 struct GSF_PendingRequestData *prd;
827 827
828 peerreq->kill_task = GNUNET_SCHEDULER_NO_TASK; 828 peerreq->kill_task = NULL;
829 prd = GSF_pending_request_get_data_ (pr); 829 prd = GSF_pending_request_get_data_ (pr);
830 cancel_pending_request (NULL, &prd->query, peerreq); 830 cancel_pending_request (NULL, &prd->query, peerreq);
831} 831}
@@ -987,7 +987,7 @@ handle_p2p_reply (void *cls,
987 } 987 }
988 if (GNUNET_BLOCK_EVALUATION_OK_LAST != eval) 988 if (GNUNET_BLOCK_EVALUATION_OK_LAST != eval)
989 return; 989 return;
990 if (GNUNET_SCHEDULER_NO_TASK == peerreq->kill_task) 990 if (NULL == peerreq->kill_task)
991 { 991 {
992 GNUNET_STATISTICS_update (GSF_stats, 992 GNUNET_STATISTICS_update (GSF_stats,
993 gettext_noop 993 gettext_noop
@@ -1356,7 +1356,7 @@ peer_transmit_timeout (void *cls,
1356 1356
1357 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1357 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1358 "Timeout trying to transmit to other peer\n"); 1358 "Timeout trying to transmit to other peer\n");
1359 pth->timeout_task = GNUNET_SCHEDULER_NO_TASK; 1359 pth->timeout_task = NULL;
1360 cp = pth->cp; 1360 cp = pth->cp;
1361 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth); 1361 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth);
1362 if (GNUNET_YES == pth->is_query) 1362 if (GNUNET_YES == pth->is_query)
@@ -1440,10 +1440,10 @@ GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth)
1440{ 1440{
1441 struct GSF_ConnectedPeer *cp; 1441 struct GSF_ConnectedPeer *cp;
1442 1442
1443 if (GNUNET_SCHEDULER_NO_TASK != pth->timeout_task) 1443 if (NULL != pth->timeout_task)
1444 { 1444 {
1445 GNUNET_SCHEDULER_cancel (pth->timeout_task); 1445 GNUNET_SCHEDULER_cancel (pth->timeout_task);
1446 pth->timeout_task = GNUNET_SCHEDULER_NO_TASK; 1446 pth->timeout_task = NULL;
1447 } 1447 }
1448 cp = pth->cp; 1448 cp = pth->cp;
1449 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth); 1449 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth);
@@ -1586,10 +1586,10 @@ GSF_peer_disconnect_handler_ (void *cls,
1586 GNUNET_ATS_reserve_bandwidth_cancel (cp->rc); 1586 GNUNET_ATS_reserve_bandwidth_cancel (cp->rc);
1587 cp->rc = NULL; 1587 cp->rc = NULL;
1588 } 1588 }
1589 if (GNUNET_SCHEDULER_NO_TASK != cp->rc_delay_task) 1589 if (NULL != cp->rc_delay_task)
1590 { 1590 {
1591 GNUNET_SCHEDULER_cancel (cp->rc_delay_task); 1591 GNUNET_SCHEDULER_cancel (cp->rc_delay_task);
1592 cp->rc_delay_task = GNUNET_SCHEDULER_NO_TASK; 1592 cp->rc_delay_task = NULL;
1593 } 1593 }
1594 GNUNET_CONTAINER_multihashmap_iterate (cp->request_map, 1594 GNUNET_CONTAINER_multihashmap_iterate (cp->request_map,
1595 &cancel_pending_request, cp); 1595 &cancel_pending_request, cp);
@@ -1608,10 +1608,10 @@ GSF_peer_disconnect_handler_ (void *cls,
1608 GNUNET_assert (0 == cp->cth_in_progress); 1608 GNUNET_assert (0 == cp->cth_in_progress);
1609 while (NULL != (pth = cp->pth_head)) 1609 while (NULL != (pth = cp->pth_head))
1610 { 1610 {
1611 if (pth->timeout_task != GNUNET_SCHEDULER_NO_TASK) 1611 if (pth->timeout_task != NULL)
1612 { 1612 {
1613 GNUNET_SCHEDULER_cancel (pth->timeout_task); 1613 GNUNET_SCHEDULER_cancel (pth->timeout_task);
1614 pth->timeout_task = GNUNET_SCHEDULER_NO_TASK; 1614 pth->timeout_task = NULL;
1615 } 1615 }
1616 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth); 1616 GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth);
1617 pth->gmc (pth->gmc_cls, 0, NULL); 1617 pth->gmc (pth->gmc_cls, 0, NULL);
@@ -1625,10 +1625,10 @@ GSF_peer_disconnect_handler_ (void *cls,
1625 GNUNET_free (dh); 1625 GNUNET_free (dh);
1626 } 1626 }
1627 GNUNET_PEER_change_rc (cp->ppd.pid, -1); 1627 GNUNET_PEER_change_rc (cp->ppd.pid, -1);
1628 if (GNUNET_SCHEDULER_NO_TASK != cp->mig_revive_task) 1628 if (NULL != cp->mig_revive_task)
1629 { 1629 {
1630 GNUNET_SCHEDULER_cancel (cp->mig_revive_task); 1630 GNUNET_SCHEDULER_cancel (cp->mig_revive_task);
1631 cp->mig_revive_task = GNUNET_SCHEDULER_NO_TASK; 1631 cp->mig_revive_task = NULL;
1632 } 1632 }
1633 GNUNET_free (cp); 1633 GNUNET_free (cp);
1634} 1634}
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c
index 6d3b761be..0bb5e3f38 100644
--- a/src/fs/gnunet-service-fs_lc.c
+++ b/src/fs/gnunet-service-fs_lc.c
@@ -59,7 +59,7 @@ struct ClientRequest
59 /** 59 /**
60 * Task scheduled to destroy the request. 60 * Task scheduled to destroy the request.
61 */ 61 */
62 GNUNET_SCHEDULER_TaskIdentifier kill_task; 62 struct GNUNET_SCHEDULER_Task * kill_task;
63 63
64}; 64};
65 65
@@ -193,7 +193,7 @@ client_request_destroy (void *cls,
193 struct ClientRequest *cr = cls; 193 struct ClientRequest *cr = cls;
194 struct GSF_LocalClient *lc; 194 struct GSF_LocalClient *lc;
195 195
196 cr->kill_task = GNUNET_SCHEDULER_NO_TASK; 196 cr->kill_task = NULL;
197 lc = cr->lc; 197 lc = cr->lc;
198 GNUNET_CONTAINER_DLL_remove (lc->cr_head, lc->cr_tail, cr); 198 GNUNET_CONTAINER_DLL_remove (lc->cr_head, lc->cr_tail, cr);
199 GSF_pending_request_cancel_ (cr->pr, GNUNET_YES); 199 GSF_pending_request_cancel_ (cr->pr, GNUNET_YES);
@@ -242,7 +242,7 @@ client_response_handler (void *cls,
242 if (NULL == data) 242 if (NULL == data)
243 { 243 {
244 /* local-only request, with no result, clean up. */ 244 /* local-only request, with no result, clean up. */
245 if (GNUNET_SCHEDULER_NO_TASK == cr->kill_task) 245 if (NULL == cr->kill_task)
246 cr->kill_task = GNUNET_SCHEDULER_add_now (&client_request_destroy, 246 cr->kill_task = GNUNET_SCHEDULER_add_now (&client_request_destroy,
247 cr); 247 cr);
248 return; 248 return;
@@ -285,7 +285,7 @@ client_response_handler (void *cls,
285 (int) eval); 285 (int) eval);
286 return; 286 return;
287 } 287 }
288 if (GNUNET_SCHEDULER_NO_TASK == cr->kill_task) 288 if (NULL == cr->kill_task)
289 cr->kill_task = GNUNET_SCHEDULER_add_now (&client_request_destroy, cr); 289 cr->kill_task = GNUNET_SCHEDULER_add_now (&client_request_destroy, cr);
290} 290}
291 291
@@ -497,7 +497,7 @@ GSF_client_disconnect_handler_ (void *cls,
497 return; 497 return;
498 while (NULL != (cr = pos->cr_head)) 498 while (NULL != (cr = pos->cr_head))
499 { 499 {
500 if (GNUNET_SCHEDULER_NO_TASK != cr->kill_task) 500 if (NULL != cr->kill_task)
501 GNUNET_SCHEDULER_cancel (cr->kill_task); 501 GNUNET_SCHEDULER_cancel (cr->kill_task);
502 client_request_destroy (cr, NULL); 502 client_request_destroy (cr, NULL);
503 } 503 }
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c
index 07b6b4d65..6b793a1e0 100644
--- a/src/fs/gnunet-service-fs_pe.c
+++ b/src/fs/gnunet-service-fs_pe.c
@@ -196,7 +196,7 @@ struct PeerPlan
196 /** 196 /**
197 * Current task for executing the plan. 197 * Current task for executing the plan.
198 */ 198 */
199 GNUNET_SCHEDULER_TaskIdentifier task; 199 struct GNUNET_SCHEDULER_Task * task;
200}; 200};
201 201
202 202
@@ -337,7 +337,7 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp)
337 GNUNET_CONTAINER_multihashmap_contains_value (pp->plan_map, 337 GNUNET_CONTAINER_multihashmap_contains_value (pp->plan_map,
338 get_rp_key (rp), 338 get_rp_key (rp),
339 rp)); 339 rp));
340 if (GNUNET_SCHEDULER_NO_TASK != pp->task) 340 if (NULL != pp->task)
341 GNUNET_SCHEDULER_cancel (pp->task); 341 GNUNET_SCHEDULER_cancel (pp->task);
342 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp); 342 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
343#undef N 343#undef N
@@ -391,7 +391,7 @@ transmit_message_callback (void *cls, size_t buf_size, void *buf)
391 if (NULL == buf) 391 if (NULL == buf)
392 { 392 {
393 /* failed, try again... */ 393 /* failed, try again... */
394 if (GNUNET_SCHEDULER_NO_TASK != pp->task) 394 if (NULL != pp->task)
395 GNUNET_SCHEDULER_cancel (pp->task); 395 GNUNET_SCHEDULER_cancel (pp->task);
396 396
397 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp); 397 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
@@ -404,7 +404,7 @@ transmit_message_callback (void *cls, size_t buf_size, void *buf)
404 rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap); 404 rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap);
405 if (NULL == rp) 405 if (NULL == rp)
406 { 406 {
407 if (GNUNET_SCHEDULER_NO_TASK != pp->task) 407 if (NULL != pp->task)
408 GNUNET_SCHEDULER_cancel (pp->task); 408 GNUNET_SCHEDULER_cancel (pp->task);
409 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp); 409 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
410 return 0; 410 return 0;
@@ -412,7 +412,7 @@ transmit_message_callback (void *cls, size_t buf_size, void *buf)
412 msize = GSF_pending_request_get_message_ (get_latest (rp), buf_size, buf); 412 msize = GSF_pending_request_get_message_ (get_latest (rp), buf_size, buf);
413 if (msize > buf_size) 413 if (msize > buf_size)
414 { 414 {
415 if (GNUNET_SCHEDULER_NO_TASK != pp->task) 415 if (NULL != pp->task)
416 GNUNET_SCHEDULER_cancel (pp->task); 416 GNUNET_SCHEDULER_cancel (pp->task);
417 /* buffer to small (message changed), try again */ 417 /* buffer to small (message changed), try again */
418 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp); 418 pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
@@ -451,7 +451,7 @@ schedule_peer_transmission (void *cls,
451 size_t msize; 451 size_t msize;
452 struct GNUNET_TIME_Relative delay; 452 struct GNUNET_TIME_Relative delay;
453 453
454 pp->task = GNUNET_SCHEDULER_NO_TASK; 454 pp->task = NULL;
455 if (NULL != pp->pth) 455 if (NULL != pp->pth)
456 { 456 {
457 GSF_peer_transmit_cancel_ (pp->pth); 457 GSF_peer_transmit_cancel_ (pp->pth);
@@ -661,10 +661,10 @@ GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp)
661 GSF_peer_transmit_cancel_ (pp->pth); 661 GSF_peer_transmit_cancel_ (pp->pth);
662 pp->pth = NULL; 662 pp->pth = NULL;
663 } 663 }
664 if (GNUNET_SCHEDULER_NO_TASK != pp->task) 664 if (NULL != pp->task)
665 { 665 {
666 GNUNET_SCHEDULER_cancel (pp->task); 666 GNUNET_SCHEDULER_cancel (pp->task);
667 pp->task = GNUNET_SCHEDULER_NO_TASK; 667 pp->task = NULL;
668 } 668 }
669 while (NULL != (rp = GNUNET_CONTAINER_heap_remove_root (pp->priority_heap))) 669 while (NULL != (rp = GNUNET_CONTAINER_heap_remove_root (pp->priority_heap)))
670 { 670 {
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index f809efd6c..5dc03393a 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -157,7 +157,7 @@ struct GSF_PendingRequest
157 /** 157 /**
158 * Task that warns us if the local datastore lookup takes too long. 158 * Task that warns us if the local datastore lookup takes too long.
159 */ 159 */
160 GNUNET_SCHEDULER_TaskIdentifier warn_task; 160 struct GNUNET_SCHEDULER_Task * warn_task;
161 161
162 /** 162 /**
163 * Current offset for querying our local datastore for results. 163 * Current offset for querying our local datastore for results.
@@ -632,10 +632,10 @@ clean_request (void *cls, const struct GNUNET_HashCode *key, void *value)
632 GNUNET_DHT_get_stop (pr->gh); 632 GNUNET_DHT_get_stop (pr->gh);
633 pr->gh = NULL; 633 pr->gh = NULL;
634 } 634 }
635 if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) 635 if (NULL != pr->warn_task)
636 { 636 {
637 GNUNET_SCHEDULER_cancel (pr->warn_task); 637 GNUNET_SCHEDULER_cancel (pr->warn_task);
638 pr->warn_task = GNUNET_SCHEDULER_NO_TASK; 638 pr->warn_task = NULL;
639 } 639 }
640 GNUNET_assert (GNUNET_OK == 640 GNUNET_assert (GNUNET_OK ==
641 GNUNET_CONTAINER_multihashmap_remove (pr_map, 641 GNUNET_CONTAINER_multihashmap_remove (pr_map,
@@ -690,10 +690,10 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup)
690 GNUNET_DHT_get_stop (pr->gh); 690 GNUNET_DHT_get_stop (pr->gh);
691 pr->gh = NULL; 691 pr->gh = NULL;
692 } 692 }
693 if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) 693 if (NULL != pr->warn_task)
694 { 694 {
695 GNUNET_SCHEDULER_cancel (pr->warn_task); 695 GNUNET_SCHEDULER_cancel (pr->warn_task);
696 pr->warn_task = GNUNET_SCHEDULER_NO_TASK; 696 pr->warn_task = NULL;
697 } 697 }
698 return; 698 return;
699 } 699 }
@@ -1307,7 +1307,7 @@ process_local_reply (void *cls, const struct GNUNET_HashCode * key, size_t size,
1307 unsigned int old_rf; 1307 unsigned int old_rf;
1308 1308
1309 GNUNET_SCHEDULER_cancel (pr->warn_task); 1309 GNUNET_SCHEDULER_cancel (pr->warn_task);
1310 pr->warn_task = GNUNET_SCHEDULER_NO_TASK; 1310 pr->warn_task = NULL;
1311 if (NULL != pr->qe) 1311 if (NULL != pr->qe)
1312 { 1312 {
1313 pr->qe = NULL; 1313 pr->qe = NULL;
@@ -1514,10 +1514,10 @@ process_local_reply (void *cls, const struct GNUNET_HashCode * key, size_t size,
1514check_error_and_continue: 1514check_error_and_continue:
1515 if (NULL != pr->qe) 1515 if (NULL != pr->qe)
1516 return; 1516 return;
1517 if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) 1517 if (NULL != pr->warn_task)
1518 { 1518 {
1519 GNUNET_SCHEDULER_cancel (pr->warn_task); 1519 GNUNET_SCHEDULER_cancel (pr->warn_task);
1520 pr->warn_task = GNUNET_SCHEDULER_NO_TASK; 1520 pr->warn_task = NULL;
1521 } 1521 }
1522 if (NULL == (cont = pr->llc_cont)) 1522 if (NULL == (cont = pr->llc_cont))
1523 return; /* no continuation */ 1523 return; /* no continuation */
@@ -1620,7 +1620,7 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr,
1620 ("# Datastore lookups concluded (error queueing)"), 1620 ("# Datastore lookups concluded (error queueing)"),
1621 1, GNUNET_NO); 1621 1, GNUNET_NO);
1622 GNUNET_SCHEDULER_cancel (pr->warn_task); 1622 GNUNET_SCHEDULER_cancel (pr->warn_task);
1623 pr->warn_task = GNUNET_SCHEDULER_NO_TASK; 1623 pr->warn_task = NULL;
1624 pr->llc_cont = NULL; 1624 pr->llc_cont = NULL;
1625 if (NULL != cont) 1625 if (NULL != cont)
1626 cont (cont_cls, pr, pr->local_result); 1626 cont (cont_cls, pr, pr->local_result);
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c
index f099f7fdc..88c92828f 100644
--- a/src/fs/gnunet-service-fs_push.c
+++ b/src/fs/gnunet-service-fs_push.c
@@ -163,7 +163,7 @@ static struct GNUNET_DATASTORE_QueueEntry *mig_qe;
163/** 163/**
164 * ID of task that collects blocks for migration. 164 * ID of task that collects blocks for migration.
165 */ 165 */
166static GNUNET_SCHEDULER_TaskIdentifier mig_task; 166static struct GNUNET_SCHEDULER_Task * mig_task;
167 167
168/** 168/**
169 * What is the maximum frequency at which we are allowed to 169 * What is the maximum frequency at which we are allowed to
@@ -452,7 +452,7 @@ consider_gathering ()
452 return; 452 return;
453 if (NULL != mig_qe) 453 if (NULL != mig_qe)
454 return; 454 return;
455 if (GNUNET_SCHEDULER_NO_TASK != mig_task) 455 if (NULL != mig_task)
456 return; 456 return;
457 if (mig_size >= MAX_MIGRATION_QUEUE) 457 if (mig_size >= MAX_MIGRATION_QUEUE)
458 return; 458 return;
@@ -575,7 +575,7 @@ static void
575gather_migration_blocks (void *cls, 575gather_migration_blocks (void *cls,
576 const struct GNUNET_SCHEDULER_TaskContext *tc) 576 const struct GNUNET_SCHEDULER_TaskContext *tc)
577{ 577{
578 mig_task = GNUNET_SCHEDULER_NO_TASK; 578 mig_task = NULL;
579 if (mig_size >= MAX_MIGRATION_QUEUE) 579 if (mig_size >= MAX_MIGRATION_QUEUE)
580 return; 580 return;
581 if (NULL == GSF_dsh) 581 if (NULL == GSF_dsh)
@@ -682,10 +682,10 @@ GSF_push_init_ ()
682void 682void
683GSF_push_done_ () 683GSF_push_done_ ()
684{ 684{
685 if (GNUNET_SCHEDULER_NO_TASK != mig_task) 685 if (NULL != mig_task)
686 { 686 {
687 GNUNET_SCHEDULER_cancel (mig_task); 687 GNUNET_SCHEDULER_cancel (mig_task);
688 mig_task = GNUNET_SCHEDULER_NO_TASK; 688 mig_task = NULL;
689 } 689 }
690 if (NULL != mig_qe) 690 if (NULL != mig_qe)
691 { 691 {
diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c
index 8e9d70f72..9eef491da 100644
--- a/src/fs/gnunet-service-fs_put.c
+++ b/src/fs/gnunet-service-fs_put.c
@@ -63,7 +63,7 @@ struct PutOperator
63 /** 63 /**
64 * ID of task that collects blocks for DHT PUTs. 64 * ID of task that collects blocks for DHT PUTs.
65 */ 65 */
66 GNUNET_SCHEDULER_TaskIdentifier dht_task; 66 struct GNUNET_SCHEDULER_Task * dht_task;
67 67
68 /** 68 /**
69 * How many entires with zero anonymity of our type do we currently 69 * How many entires with zero anonymity of our type do we currently
@@ -158,7 +158,7 @@ delay_dht_put_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
158{ 158{
159 struct PutOperator *po = cls; 159 struct PutOperator *po = cls;
160 160
161 po->dht_task = GNUNET_SCHEDULER_NO_TASK; 161 po->dht_task = NULL;
162 schedule_next_put (po); 162 schedule_next_put (po);
163} 163}
164 164
@@ -219,7 +219,7 @@ gather_dht_put_blocks (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
219{ 219{
220 struct PutOperator *po = cls; 220 struct PutOperator *po = cls;
221 221
222 po->dht_task = GNUNET_SCHEDULER_NO_TASK; 222 po->dht_task = NULL;
223 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 223 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
224 return; 224 return;
225 po->dht_qe = 225 po->dht_qe =
@@ -263,10 +263,10 @@ GSF_put_done_ ()
263 i = 0; 263 i = 0;
264 while ((po = &operators[i])->dht_put_type != GNUNET_BLOCK_TYPE_ANY) 264 while ((po = &operators[i])->dht_put_type != GNUNET_BLOCK_TYPE_ANY)
265 { 265 {
266 if (GNUNET_SCHEDULER_NO_TASK != po->dht_task) 266 if (NULL != po->dht_task)
267 { 267 {
268 GNUNET_SCHEDULER_cancel (po->dht_task); 268 GNUNET_SCHEDULER_cancel (po->dht_task);
269 po->dht_task = GNUNET_SCHEDULER_NO_TASK; 269 po->dht_task = NULL;
270 } 270 }
271 if (NULL != po->dht_put) 271 if (NULL != po->dht_put)
272 { 272 {
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
58static struct GNUNET_FS_PublishContext *publish; 58static struct GNUNET_FS_PublishContext *publish;
59 59
60static GNUNET_SCHEDULER_TaskIdentifier timeout_kill; 60static struct GNUNET_SCHEDULER_Task * timeout_kill;
61 61
62static char *fn; 62static 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
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c
index a9b998013..7e1f01ae7 100644
--- a/src/fs/test_fs_download_persistence.c
+++ b/src/fs/test_fs_download_persistence.c
@@ -54,7 +54,7 @@ static struct GNUNET_FS_DownloadContext *download;
54 54
55static struct GNUNET_FS_PublishContext *publish; 55static struct GNUNET_FS_PublishContext *publish;
56 56
57static GNUNET_SCHEDULER_TaskIdentifier timeout_kill; 57static struct GNUNET_SCHEDULER_Task * timeout_kill;
58 58
59static char *fn; 59static char *fn;
60 60
@@ -75,7 +75,7 @@ timeout_kill_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
75 GNUNET_FS_publish_stop (publish); 75 GNUNET_FS_publish_stop (publish);
76 publish = NULL; 76 publish = NULL;
77 } 77 }
78 timeout_kill = GNUNET_SCHEDULER_NO_TASK; 78 timeout_kill = NULL;
79 err = 1; 79 err = 1;
80} 80}
81 81
@@ -107,7 +107,7 @@ abort_download_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
107 GNUNET_free (fn); 107 GNUNET_free (fn);
108 fn = NULL; 108 fn = NULL;
109 GNUNET_SCHEDULER_cancel (timeout_kill); 109 GNUNET_SCHEDULER_cancel (timeout_kill);
110 timeout_kill = GNUNET_SCHEDULER_NO_TASK; 110 timeout_kill = NULL;
111} 111}
112 112
113 113
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index c78008122..461bfdcdd 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -41,7 +41,7 @@ static struct GNUNET_FS_SearchContext *sks_search;
41 41
42static struct GNUNET_FS_SearchContext *ksk_search; 42static struct GNUNET_FS_SearchContext *ksk_search;
43 43
44static GNUNET_SCHEDULER_TaskIdentifier kill_task; 44static struct GNUNET_SCHEDULER_Task * kill_task;
45 45
46static int update_started; 46static int update_started;
47 47
@@ -58,7 +58,7 @@ abort_ksk_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
58 if (sks_search == NULL) 58 if (sks_search == NULL)
59 { 59 {
60 GNUNET_FS_stop (fs); 60 GNUNET_FS_stop (fs);
61 if (GNUNET_SCHEDULER_NO_TASK != kill_task) 61 if (NULL != kill_task)
62 GNUNET_SCHEDULER_cancel (kill_task); 62 GNUNET_SCHEDULER_cancel (kill_task);
63 } 63 }
64 } 64 }
@@ -75,7 +75,7 @@ abort_sks_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
75 if (ksk_search == NULL) 75 if (ksk_search == NULL)
76 { 76 {
77 GNUNET_FS_stop (fs); 77 GNUNET_FS_stop (fs);
78 if (GNUNET_SCHEDULER_NO_TASK != kill_task) 78 if (NULL != kill_task)
79 GNUNET_SCHEDULER_cancel (kill_task); 79 GNUNET_SCHEDULER_cancel (kill_task);
80 } 80 }
81} 81}
@@ -86,7 +86,7 @@ do_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
86{ 86{
87 err = 1; 87 err = 1;
88 FPRINTF (stderr, "%s", "Operation timed out\n"); 88 FPRINTF (stderr, "%s", "Operation timed out\n");
89 kill_task = GNUNET_SCHEDULER_NO_TASK; 89 kill_task = NULL;
90 abort_sks_search_task (NULL, tc); 90 abort_sks_search_task (NULL, tc);
91 abort_ksk_search_task (NULL, tc); 91 abort_ksk_search_task (NULL, tc);
92} 92}
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c
index 8e5e5f53b..3c8b6e34e 100644
--- a/src/fs/test_fs_publish_persistence.c
+++ b/src/fs/test_fs_publish_persistence.c
@@ -60,7 +60,7 @@ static char *fn2;
60 60
61static int err; 61static int err;
62 62
63static GNUNET_SCHEDULER_TaskIdentifier rtask; 63static struct GNUNET_SCHEDULER_Task * rtask;
64 64
65 65
66static void 66static void
@@ -76,10 +76,10 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
76 fn2 = NULL; 76 fn2 = NULL;
77 GNUNET_FS_stop (fs); 77 GNUNET_FS_stop (fs);
78 fs = NULL; 78 fs = NULL;
79 if (GNUNET_SCHEDULER_NO_TASK != rtask) 79 if (NULL != rtask)
80 { 80 {
81 GNUNET_SCHEDULER_cancel (rtask); 81 GNUNET_SCHEDULER_cancel (rtask);
82 rtask = GNUNET_SCHEDULER_NO_TASK; 82 rtask = NULL;
83 } 83 }
84} 84}
85 85
@@ -91,7 +91,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
91static void 91static void
92restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 92restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
93{ 93{
94 rtask = GNUNET_SCHEDULER_NO_TASK; 94 rtask = NULL;
95 GNUNET_FS_stop (fs); 95 GNUNET_FS_stop (fs);
96 fs = GNUNET_FS_start (cfg, "test-fs-publish-persistence", 96 fs = GNUNET_FS_start (cfg, "test-fs-publish-persistence",
97 &progress_cb, NULL, 97 &progress_cb, NULL,
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c
index f525fb474..caf2898b2 100644
--- a/src/fs/test_fs_search.c
+++ b/src/fs/test_fs_search.c
@@ -52,7 +52,7 @@ static struct GNUNET_FS_SearchContext *search;
52 52
53static struct GNUNET_FS_PublishContext *publish; 53static struct GNUNET_FS_PublishContext *publish;
54 54
55static GNUNET_SCHEDULER_TaskIdentifier timeout_task; 55static struct GNUNET_SCHEDULER_Task * timeout_task;
56 56
57static int err; 57static int err;
58 58
@@ -65,10 +65,10 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
65 GNUNET_FS_publish_stop (publish); 65 GNUNET_FS_publish_stop (publish);
66 publish = NULL; 66 publish = NULL;
67 } 67 }
68 if (GNUNET_SCHEDULER_NO_TASK != timeout_task) 68 if (NULL != timeout_task)
69 { 69 {
70 GNUNET_SCHEDULER_cancel (timeout_task); 70 GNUNET_SCHEDULER_cancel (timeout_task);
71 timeout_task = GNUNET_SCHEDULER_NO_TASK; 71 timeout_task = NULL;
72 } 72 }
73} 73}
74 74
@@ -78,7 +78,7 @@ abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
78{ 78{
79 fprintf (stderr, 79 fprintf (stderr,
80 "Timeout\n"); 80 "Timeout\n");
81 timeout_task = GNUNET_SCHEDULER_NO_TASK; 81 timeout_task = NULL;
82 if (NULL != search) 82 if (NULL != search)
83 { 83 {
84 GNUNET_FS_search_stop (search); 84 GNUNET_FS_search_stop (search);
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c
index 34ea04aca..780f21d99 100644
--- a/src/fs/test_fs_search_persistence.c
+++ b/src/fs/test_fs_search_persistence.c
@@ -54,7 +54,7 @@ static struct GNUNET_FS_PublishContext *publish;
54 54
55static const struct GNUNET_CONFIGURATION_Handle *cfg; 55static const struct GNUNET_CONFIGURATION_Handle *cfg;
56 56
57static GNUNET_SCHEDULER_TaskIdentifier timeout_task; 57static struct GNUNET_SCHEDULER_Task * timeout_task;
58 58
59static int err; 59static int err;
60 60
@@ -62,7 +62,7 @@ static int err;
62static void 62static void
63abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 63abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
64{ 64{
65 timeout_task = GNUNET_SCHEDULER_NO_TASK; 65 timeout_task = NULL;
66 fprintf (stderr, 66 fprintf (stderr,
67 "Timeout\n"); 67 "Timeout\n");
68 if (NULL != search) 68 if (NULL != search)
@@ -86,10 +86,10 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
86 GNUNET_FS_publish_stop (publish); 86 GNUNET_FS_publish_stop (publish);
87 publish = NULL; 87 publish = NULL;
88 } 88 }
89 if (GNUNET_SCHEDULER_NO_TASK != timeout_task) 89 if (NULL != timeout_task)
90 { 90 {
91 GNUNET_SCHEDULER_cancel (timeout_task); 91 GNUNET_SCHEDULER_cancel (timeout_task);
92 timeout_task = GNUNET_SCHEDULER_NO_TASK; 92 timeout_task = NULL;
93 } 93 }
94} 94}
95 95
diff --git a/src/fs/test_fs_search_probes.c b/src/fs/test_fs_search_probes.c
index beae34763..c7abd073f 100644
--- a/src/fs/test_fs_search_probes.c
+++ b/src/fs/test_fs_search_probes.c
@@ -53,7 +53,7 @@ static struct GNUNET_FS_SearchContext *search;
53 53
54static struct GNUNET_FS_PublishContext *publish; 54static struct GNUNET_FS_PublishContext *publish;
55 55
56static GNUNET_SCHEDULER_TaskIdentifier timeout_task; 56static struct GNUNET_SCHEDULER_Task * timeout_task;
57 57
58static int err; 58static int err;
59 59
@@ -61,7 +61,7 @@ static int err;
61static void 61static void
62abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 62abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
63{ 63{
64 timeout_task = GNUNET_SCHEDULER_NO_TASK; 64 timeout_task = NULL;
65 fprintf (stderr, 65 fprintf (stderr,
66 "Timeout\n"); 66 "Timeout\n");
67 if (NULL != search) 67 if (NULL != search)
@@ -86,10 +86,10 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
86 GNUNET_FS_publish_stop (publish); 86 GNUNET_FS_publish_stop (publish);
87 publish = NULL; 87 publish = NULL;
88 } 88 }
89 if (GNUNET_SCHEDULER_NO_TASK != timeout_task) 89 if (NULL != timeout_task)
90 { 90 {
91 GNUNET_SCHEDULER_cancel (timeout_task); 91 GNUNET_SCHEDULER_cancel (timeout_task);
92 timeout_task = GNUNET_SCHEDULER_NO_TASK; 92 timeout_task = NULL;
93 } 93 }
94} 94}
95 95
diff --git a/src/fs/test_fs_search_with_and.c b/src/fs/test_fs_search_with_and.c
index 80cd03213..cca0e342e 100644
--- a/src/fs/test_fs_search_with_and.c
+++ b/src/fs/test_fs_search_with_and.c
@@ -58,7 +58,7 @@ static struct GNUNET_FS_SearchContext *search;
58 58
59static struct GNUNET_FS_PublishContext *publish; 59static struct GNUNET_FS_PublishContext *publish;
60 60
61static GNUNET_SCHEDULER_TaskIdentifier timeout_task; 61static struct GNUNET_SCHEDULER_Task * timeout_task;
62 62
63static int err; 63static int err;
64 64
@@ -73,10 +73,10 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
73 GNUNET_FS_publish_stop (publish); 73 GNUNET_FS_publish_stop (publish);
74 publish = NULL; 74 publish = NULL;
75 } 75 }
76 if (GNUNET_SCHEDULER_NO_TASK != timeout_task) 76 if (NULL != timeout_task)
77 { 77 {
78 GNUNET_SCHEDULER_cancel (timeout_task); 78 GNUNET_SCHEDULER_cancel (timeout_task);
79 timeout_task = GNUNET_SCHEDULER_NO_TASK; 79 timeout_task = NULL;
80 } 80 }
81} 81}
82 82
@@ -86,7 +86,7 @@ abort_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
86{ 86{
87 fprintf (stderr, 87 fprintf (stderr,
88 "Timeout\n"); 88 "Timeout\n");
89 timeout_task = GNUNET_SCHEDULER_NO_TASK; 89 timeout_task = NULL;
90 if (NULL != search) 90 if (NULL != search)
91 { 91 {
92 GNUNET_FS_search_stop (search); 92 GNUNET_FS_search_stop (search);