diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-11-04 14:10:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-11-04 14:10:32 +0000 |
commit | cf45b8dff29c366d51aa2e6ea6a64b99b514b9c9 (patch) | |
tree | 5cb37c041743daff5af528dbbe24f5c563ce702e /src/fs | |
parent | b91546a3de767292e6472c6b1927480adba43d88 (diff) | |
download | gnunet-cf45b8dff29c366d51aa2e6ea6a64b99b514b9c9.tar.gz gnunet-cf45b8dff29c366d51aa2e6ea6a64b99b514b9c9.zip |
bugfixes and redesigning scheduler API
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_download.c | 3 | ||||
-rw-r--r-- | src/fs/fs_list_indexed.c | 5 | ||||
-rw-r--r-- | src/fs/fs_publish.c | 53 | ||||
-rw-r--r-- | src/fs/fs_search.c | 3 | ||||
-rw-r--r-- | src/fs/fs_tree.c | 2 | ||||
-rw-r--r-- | src/fs/fs_unindex.c | 1 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs.c | 47 | ||||
-rw-r--r-- | src/fs/test_fs_download.c | 6 | ||||
-rw-r--r-- | src/fs/test_fs_list_indexed.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_publish.c | 3 | ||||
-rw-r--r-- | src/fs/test_fs_search.c | 4 | ||||
-rw-r--r-- | src/fs/test_fs_unindex.c | 4 |
12 files changed, 22 insertions, 112 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index e92eb85c1..4b3d96082 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -718,9 +718,6 @@ try_reconnect (struct GNUNET_FS_DownloadContext *dc) | |||
718 | } | 718 | } |
719 | dc->task | 719 | dc->task |
720 | = GNUNET_SCHEDULER_add_delayed (dc->h->sched, | 720 | = GNUNET_SCHEDULER_add_delayed (dc->h->sched, |
721 | GNUNET_NO, | ||
722 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
723 | GNUNET_SCHEDULER_NO_TASK, | ||
724 | GNUNET_TIME_UNIT_SECONDS, | 721 | GNUNET_TIME_UNIT_SECONDS, |
725 | &do_reconnect, | 722 | &do_reconnect, |
726 | dc); | 723 | dc); |
diff --git a/src/fs/fs_list_indexed.c b/src/fs/fs_list_indexed.c index 9ef205ca0..d182f9aa4 100644 --- a/src/fs/fs_list_indexed.c +++ b/src/fs/fs_list_indexed.c | |||
@@ -91,7 +91,6 @@ handle_index_info (void *cls, | |||
91 | "GET_INDEXED", | 91 | "GET_INDEXED", |
92 | "fs"); | 92 | "fs"); |
93 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, | 93 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, |
94 | GNUNET_NO, | ||
95 | gic->cont, | 94 | gic->cont, |
96 | gic->cont_cls, | 95 | gic->cont_cls, |
97 | GNUNET_SCHEDULER_REASON_TIMEOUT); | 96 | GNUNET_SCHEDULER_REASON_TIMEOUT); |
@@ -103,7 +102,6 @@ handle_index_info (void *cls, | |||
103 | { | 102 | { |
104 | /* normal end-of-list */ | 103 | /* normal end-of-list */ |
105 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, | 104 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, |
106 | GNUNET_NO, | ||
107 | gic->cont, | 105 | gic->cont, |
108 | gic->cont_cls, | 106 | gic->cont_cls, |
109 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 107 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -124,7 +122,6 @@ handle_index_info (void *cls, | |||
124 | "GET_INDEXED", | 122 | "GET_INDEXED", |
125 | "fs"); | 123 | "fs"); |
126 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, | 124 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, |
127 | GNUNET_NO, | ||
128 | gic->cont, | 125 | gic->cont, |
129 | gic->cont_cls, | 126 | gic->cont_cls, |
130 | GNUNET_SCHEDULER_REASON_TIMEOUT); | 127 | GNUNET_SCHEDULER_REASON_TIMEOUT); |
@@ -138,7 +135,6 @@ handle_index_info (void *cls, | |||
138 | &iim->file_id)) | 135 | &iim->file_id)) |
139 | { | 136 | { |
140 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, | 137 | GNUNET_SCHEDULER_add_continuation (gic->h->sched, |
141 | GNUNET_NO, | ||
142 | gic->cont, | 138 | gic->cont, |
143 | gic->cont_cls, | 139 | gic->cont_cls, |
144 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 140 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -185,7 +181,6 @@ GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h, | |||
185 | _("Failed to not connect to `%s' service.\n"), | 181 | _("Failed to not connect to `%s' service.\n"), |
186 | "fs"); | 182 | "fs"); |
187 | GNUNET_SCHEDULER_add_continuation (h->sched, | 183 | GNUNET_SCHEDULER_add_continuation (h->sched, |
188 | GNUNET_NO, | ||
189 | cont, | 184 | cont, |
190 | cont_cls, | 185 | cont_cls, |
191 | GNUNET_SCHEDULER_REASON_TIMEOUT); | 186 | GNUNET_SCHEDULER_REASON_TIMEOUT); |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 721951970..bef03a45e 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -185,13 +185,10 @@ ds_put_cont (void *cls, | |||
185 | GNUNET_FS_file_information_sync (pcc->p); | 185 | GNUNET_FS_file_information_sync (pcc->p); |
186 | if (NULL != pcc->cont) | 186 | if (NULL != pcc->cont) |
187 | pcc->sc->upload_task | 187 | pcc->sc->upload_task |
188 | = GNUNET_SCHEDULER_add_delayed (pcc->sc->h->sched, | 188 | = GNUNET_SCHEDULER_add_with_priority (pcc->sc->h->sched, |
189 | GNUNET_NO, | 189 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
190 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 190 | pcc->cont, |
191 | GNUNET_SCHEDULER_NO_TASK, | 191 | pcc->cont_cls); |
192 | GNUNET_TIME_UNIT_ZERO, | ||
193 | pcc->cont, | ||
194 | pcc->cont_cls); | ||
195 | GNUNET_free (pcc); | 192 | GNUNET_free (pcc); |
196 | } | 193 | } |
197 | 194 | ||
@@ -325,13 +322,10 @@ publish_kblocks_cont (void *cls, | |||
325 | { | 322 | { |
326 | signal_publish_error (p, sc, emsg); | 323 | signal_publish_error (p, sc, emsg); |
327 | sc->upload_task | 324 | sc->upload_task |
328 | = GNUNET_SCHEDULER_add_delayed (sc->h->sched, | 325 | = GNUNET_SCHEDULER_add_with_priority (sc->h->sched, |
329 | GNUNET_NO, | 326 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
330 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 327 | &do_upload, |
331 | GNUNET_SCHEDULER_NO_TASK, | 328 | sc); |
332 | GNUNET_TIME_UNIT_ZERO, | ||
333 | &do_upload, | ||
334 | sc); | ||
335 | return; | 329 | return; |
336 | } | 330 | } |
337 | GNUNET_FS_file_information_sync (p); | 331 | GNUNET_FS_file_information_sync (p); |
@@ -343,13 +337,10 @@ publish_kblocks_cont (void *cls, | |||
343 | else | 337 | else |
344 | sc->fi_pos = p->dir; | 338 | sc->fi_pos = p->dir; |
345 | sc->upload_task | 339 | sc->upload_task |
346 | = GNUNET_SCHEDULER_add_delayed (sc->h->sched, | 340 | = GNUNET_SCHEDULER_add_with_priority (sc->h->sched, |
347 | GNUNET_NO, | 341 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
348 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 342 | &do_upload, |
349 | GNUNET_SCHEDULER_NO_TASK, | 343 | sc); |
350 | GNUNET_TIME_UNIT_ZERO, | ||
351 | &do_upload, | ||
352 | sc); | ||
353 | } | 344 | } |
354 | 345 | ||
355 | 346 | ||
@@ -446,11 +437,8 @@ encode_cont (void *cls, | |||
446 | } | 437 | } |
447 | /* continue with main */ | 438 | /* continue with main */ |
448 | sc->upload_task | 439 | sc->upload_task |
449 | = GNUNET_SCHEDULER_add_delayed (sc->h->sched, | 440 | = GNUNET_SCHEDULER_add_with_priority (sc->h->sched, |
450 | GNUNET_NO, | 441 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
451 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | ||
452 | GNUNET_SCHEDULER_NO_TASK, | ||
453 | GNUNET_TIME_UNIT_ZERO, | ||
454 | &do_upload, | 442 | &do_upload, |
455 | sc); | 443 | sc); |
456 | } | 444 | } |
@@ -486,11 +474,8 @@ block_proc (void *cls, | |||
486 | if (NULL == sc->dsh) | 474 | if (NULL == sc->dsh) |
487 | { | 475 | { |
488 | sc->upload_task | 476 | sc->upload_task |
489 | = GNUNET_SCHEDULER_add_delayed (sc->h->sched, | 477 | = GNUNET_SCHEDULER_add_with_priority (sc->h->sched, |
490 | GNUNET_NO, | ||
491 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 478 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
492 | GNUNET_SCHEDULER_NO_TASK, | ||
493 | GNUNET_TIME_UNIT_ZERO, | ||
494 | &do_upload, | 479 | &do_upload, |
495 | sc); | 480 | sc); |
496 | return; | 481 | return; |
@@ -910,7 +895,6 @@ do_upload (void *cls, | |||
910 | else | 895 | else |
911 | GNUNET_CRYPTO_hash_file (sc->h->sched, | 896 | GNUNET_CRYPTO_hash_file (sc->h->sched, |
912 | GNUNET_SCHEDULER_PRIORITY_IDLE, | 897 | GNUNET_SCHEDULER_PRIORITY_IDLE, |
913 | GNUNET_NO, | ||
914 | p->data.file.filename, | 898 | p->data.file.filename, |
915 | HASHING_BLOCKSIZE, | 899 | HASHING_BLOCKSIZE, |
916 | &hash_for_index_cb, | 900 | &hash_for_index_cb, |
@@ -1018,11 +1002,8 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, | |||
1018 | // and reserve as first task (then trigger | 1002 | // and reserve as first task (then trigger |
1019 | // "do_upload" from that continuation)! | 1003 | // "do_upload" from that continuation)! |
1020 | ret->upload_task | 1004 | ret->upload_task |
1021 | = GNUNET_SCHEDULER_add_delayed (h->sched, | 1005 | = GNUNET_SCHEDULER_add_with_priority (h->sched, |
1022 | GNUNET_NO, | ||
1023 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 1006 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
1024 | GNUNET_SCHEDULER_NO_TASK, | ||
1025 | GNUNET_TIME_UNIT_ZERO, | ||
1026 | &do_upload, | 1007 | &do_upload, |
1027 | ret); | 1008 | ret); |
1028 | return ret; | 1009 | return ret; |
@@ -1217,7 +1198,6 @@ kb_put_cont (void *cls, | |||
1217 | return; | 1198 | return; |
1218 | } | 1199 | } |
1219 | GNUNET_SCHEDULER_add_continuation (pkc->h->sched, | 1200 | GNUNET_SCHEDULER_add_continuation (pkc->h->sched, |
1220 | GNUNET_NO, | ||
1221 | &publish_ksk_cont, | 1201 | &publish_ksk_cont, |
1222 | pkc, | 1202 | pkc, |
1223 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 1203 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -1383,7 +1363,6 @@ GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h, | |||
1383 | pkc->cpy->purpose.purpose = htonl(GNUNET_SIGNATURE_PURPOSE_FS_KBLOCK); | 1363 | pkc->cpy->purpose.purpose = htonl(GNUNET_SIGNATURE_PURPOSE_FS_KBLOCK); |
1384 | pkc->ksk_uri = GNUNET_FS_uri_dup (ksk_uri); | 1364 | pkc->ksk_uri = GNUNET_FS_uri_dup (ksk_uri); |
1385 | GNUNET_SCHEDULER_add_continuation (h->sched, | 1365 | GNUNET_SCHEDULER_add_continuation (h->sched, |
1386 | GNUNET_NO, | ||
1387 | &publish_ksk_cont, | 1366 | &publish_ksk_cont, |
1388 | pkc, | 1367 | pkc, |
1389 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 1368 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 8b986ec7c..5d03046e2 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -720,9 +720,6 @@ try_reconnect (struct GNUNET_FS_SearchContext *sc) | |||
720 | } | 720 | } |
721 | sc->task | 721 | sc->task |
722 | = GNUNET_SCHEDULER_add_delayed (sc->h->sched, | 722 | = GNUNET_SCHEDULER_add_delayed (sc->h->sched, |
723 | GNUNET_NO, | ||
724 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
725 | GNUNET_SCHEDULER_NO_TASK, | ||
726 | GNUNET_TIME_UNIT_SECONDS, | 723 | GNUNET_TIME_UNIT_SECONDS, |
727 | &do_reconnect, | 724 | &do_reconnect, |
728 | sc); | 725 | sc); |
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index 83da423f3..4d15d78f3 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -287,7 +287,6 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te) | |||
287 | &te->emsg)) | 287 | &te->emsg)) |
288 | { | 288 | { |
289 | GNUNET_SCHEDULER_add_continuation (te->h->sched, | 289 | GNUNET_SCHEDULER_add_continuation (te->h->sched, |
290 | GNUNET_NO, | ||
291 | te->cont, | 290 | te->cont, |
292 | te->cls, | 291 | te->cls, |
293 | GNUNET_SCHEDULER_REASON_TIMEOUT); | 292 | GNUNET_SCHEDULER_REASON_TIMEOUT); |
@@ -309,7 +308,6 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te) | |||
309 | te->uri->data.chk.chk = te->chk_tree[0]; | 308 | te->uri->data.chk.chk = te->chk_tree[0]; |
310 | te->uri->data.chk.file_length = GNUNET_htonll (te->size); | 309 | te->uri->data.chk.file_length = GNUNET_htonll (te->size); |
311 | GNUNET_SCHEDULER_add_continuation (te->h->sched, | 310 | GNUNET_SCHEDULER_add_continuation (te->h->sched, |
312 | GNUNET_NO, | ||
313 | te->cont, | 311 | te->cont, |
314 | te->cls, | 312 | te->cls, |
315 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 313 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index 0c3738753..243209b0e 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -420,7 +420,6 @@ GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, | |||
420 | &pi); | 420 | &pi); |
421 | GNUNET_CRYPTO_hash_file (h->sched, | 421 | GNUNET_CRYPTO_hash_file (h->sched, |
422 | GNUNET_SCHEDULER_PRIORITY_IDLE, | 422 | GNUNET_SCHEDULER_PRIORITY_IDLE, |
423 | GNUNET_NO, | ||
424 | filename, | 423 | filename, |
425 | HASHING_BLOCKSIZE, | 424 | HASHING_BLOCKSIZE, |
426 | &process_hash, | 425 | &process_hash, |
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 5148c4675..ca6b9b426 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -1075,7 +1075,6 @@ handle_index_start (void *cls, | |||
1075 | /* slow validation, need to hash full file (again) */ | 1075 | /* slow validation, need to hash full file (again) */ |
1076 | GNUNET_CRYPTO_hash_file (sched, | 1076 | GNUNET_CRYPTO_hash_file (sched, |
1077 | GNUNET_SCHEDULER_PRIORITY_IDLE, | 1077 | GNUNET_SCHEDULER_PRIORITY_IDLE, |
1078 | GNUNET_NO, | ||
1079 | fn, | 1078 | fn, |
1080 | HASHING_BLOCKSIZE, | 1079 | HASHING_BLOCKSIZE, |
1081 | &hash_for_index_val, | 1080 | &hash_for_index_val, |
@@ -1287,9 +1286,6 @@ queue_ds_request (struct GNUNET_TIME_Relative deadline, | |||
1287 | if (deadline.value == GNUNET_TIME_UNIT_FOREVER_REL.value) | 1286 | if (deadline.value == GNUNET_TIME_UNIT_FOREVER_REL.value) |
1288 | return e; | 1287 | return e; |
1289 | e->task = GNUNET_SCHEDULER_add_delayed (sched, | 1288 | e->task = GNUNET_SCHEDULER_add_delayed (sched, |
1290 | GNUNET_NO, | ||
1291 | GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | ||
1292 | GNUNET_SCHEDULER_NO_TASK, | ||
1293 | deadline, | 1289 | deadline, |
1294 | &timeout_ds_request, | 1290 | &timeout_ds_request, |
1295 | e); | 1291 | e); |
@@ -1718,13 +1714,10 @@ transmit_request_cb (void *cls, | |||
1718 | if (NULL == buf) | 1714 | if (NULL == buf) |
1719 | { | 1715 | { |
1720 | /* timeout, try another peer immediately again */ | 1716 | /* timeout, try another peer immediately again */ |
1721 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 1717 | pr->task = GNUNET_SCHEDULER_add_with_priority (sched, |
1722 | GNUNET_NO, | 1718 | GNUNET_SCHEDULER_PRIORITY_IDLE, |
1723 | GNUNET_SCHEDULER_PRIORITY_IDLE, | 1719 | &forward_request_task, |
1724 | GNUNET_SCHEDULER_NO_TASK, | 1720 | pr); |
1725 | GNUNET_TIME_UNIT_ZERO, | ||
1726 | &forward_request_task, | ||
1727 | pr); | ||
1728 | return 0; | 1721 | return 0; |
1729 | } | 1722 | } |
1730 | /* (2) build query message */ | 1723 | /* (2) build query message */ |
@@ -1751,9 +1744,6 @@ transmit_request_cb (void *cls, | |||
1751 | 1744 | ||
1752 | /* (3) schedule job to do it again (or another peer, etc.) */ | 1745 | /* (3) schedule job to do it again (or another peer, etc.) */ |
1753 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 1746 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, |
1754 | GNUNET_NO, | ||
1755 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
1756 | GNUNET_SCHEDULER_NO_TASK, | ||
1757 | get_processing_delay (), // FIXME! | 1747 | get_processing_delay (), // FIXME! |
1758 | &forward_request_task, | 1748 | &forward_request_task, |
1759 | pr); | 1749 | pr); |
@@ -1797,9 +1787,6 @@ target_reservation_cb (void *cls, | |||
1797 | { | 1787 | { |
1798 | /* try again later; FIXME: we may need to un-reserve "amount"? */ | 1788 | /* try again later; FIXME: we may need to un-reserve "amount"? */ |
1799 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 1789 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, |
1800 | GNUNET_NO, | ||
1801 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
1802 | GNUNET_SCHEDULER_NO_TASK, | ||
1803 | get_processing_delay (), // FIXME: longer? | 1790 | get_processing_delay (), // FIXME: longer? |
1804 | &forward_request_task, | 1791 | &forward_request_task, |
1805 | pr); | 1792 | pr); |
@@ -1821,9 +1808,6 @@ target_reservation_cb (void *cls, | |||
1821 | { | 1808 | { |
1822 | /* try again later */ | 1809 | /* try again later */ |
1823 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 1810 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, |
1824 | GNUNET_NO, | ||
1825 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
1826 | GNUNET_SCHEDULER_NO_TASK, | ||
1827 | get_processing_delay (), // FIXME: longer? | 1811 | get_processing_delay (), // FIXME: longer? |
1828 | &forward_request_task, | 1812 | &forward_request_task, |
1829 | pr); | 1813 | pr); |
@@ -1854,9 +1838,6 @@ forward_request_task (void *cls, | |||
1854 | { | 1838 | { |
1855 | /* we're busy transmitting a result, wait a bit */ | 1839 | /* we're busy transmitting a result, wait a bit */ |
1856 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 1840 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, |
1857 | GNUNET_NO, | ||
1858 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
1859 | GNUNET_SCHEDULER_NO_TASK, | ||
1860 | get_processing_delay (), | 1841 | get_processing_delay (), |
1861 | &forward_request_task, | 1842 | &forward_request_task, |
1862 | pr); | 1843 | pr); |
@@ -1872,9 +1853,6 @@ forward_request_task (void *cls, | |||
1872 | { | 1853 | { |
1873 | /* no possible target found, wait some time */ | 1854 | /* no possible target found, wait some time */ |
1874 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 1855 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, |
1875 | GNUNET_NO, | ||
1876 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
1877 | GNUNET_SCHEDULER_NO_TASK, | ||
1878 | get_processing_delay (), // FIXME: exponential back-off? or at least wait longer... | 1856 | get_processing_delay (), // FIXME: exponential back-off? or at least wait longer... |
1879 | &forward_request_task, | 1857 | &forward_request_task, |
1880 | pr); | 1858 | pr); |
@@ -1998,9 +1976,6 @@ process_local_get_result (void *cls, | |||
1998 | pr, | 1976 | pr, |
1999 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); | 1977 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); |
2000 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 1978 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, |
2001 | GNUNET_NO, | ||
2002 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
2003 | GNUNET_SCHEDULER_NO_TASK, | ||
2004 | get_processing_delay (), | 1979 | get_processing_delay (), |
2005 | &forward_request_task, | 1980 | &forward_request_task, |
2006 | pr); | 1981 | pr); |
@@ -2132,7 +2107,6 @@ transmit_local_get_ready (void *cls, | |||
2132 | 2107 | ||
2133 | GNUNET_assert (GNUNET_OK == ok); | 2108 | GNUNET_assert (GNUNET_OK == ok); |
2134 | GNUNET_SCHEDULER_add_continuation (sched, | 2109 | GNUNET_SCHEDULER_add_continuation (sched, |
2135 | GNUNET_NO, | ||
2136 | &transmit_local_get, | 2110 | &transmit_local_get, |
2137 | lgc, | 2111 | lgc, |
2138 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 2112 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -2514,9 +2488,6 @@ forward_get_request (void *cls, | |||
2514 | destroy_pending_request (eer); | 2488 | destroy_pending_request (eer); |
2515 | } | 2489 | } |
2516 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, | 2490 | pr->task = GNUNET_SCHEDULER_add_delayed (sched, |
2517 | GNUNET_NO, | ||
2518 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
2519 | GNUNET_SCHEDULER_NO_TASK, | ||
2520 | get_processing_delay (), | 2491 | get_processing_delay (), |
2521 | &forward_request_task, | 2492 | &forward_request_task, |
2522 | pr); | 2493 | pr); |
@@ -2617,7 +2588,6 @@ process_p2p_get_result (void *cls, | |||
2617 | (pgc->type == GNUNET_DATASTORE_BLOCKTYPE_SKBLOCK) ) ) | 2588 | (pgc->type == GNUNET_DATASTORE_BLOCKTYPE_SKBLOCK) ) ) |
2618 | { | 2589 | { |
2619 | GNUNET_SCHEDULER_add_continuation (sched, | 2590 | GNUNET_SCHEDULER_add_continuation (sched, |
2620 | GNUNET_NO, | ||
2621 | &forward_get_request, | 2591 | &forward_get_request, |
2622 | pgc, | 2592 | pgc, |
2623 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 2593 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -2942,7 +2912,6 @@ handle_p2p_get (void *cls, | |||
2942 | pgc); | 2912 | pgc); |
2943 | else | 2913 | else |
2944 | GNUNET_SCHEDULER_add_continuation (sched, | 2914 | GNUNET_SCHEDULER_add_continuation (sched, |
2945 | GNUNET_NO, | ||
2946 | &forward_get_request, | 2915 | &forward_get_request, |
2947 | pgc, | 2916 | pgc, |
2948 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 2917 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -3338,9 +3307,6 @@ core_start_cb (void *cls, | |||
3338 | if (server == NULL) | 3307 | if (server == NULL) |
3339 | { | 3308 | { |
3340 | GNUNET_SCHEDULER_add_delayed (sched, | 3309 | GNUNET_SCHEDULER_add_delayed (sched, |
3341 | GNUNET_NO, | ||
3342 | GNUNET_SCHEDULER_PRIORITY_HIGH, | ||
3343 | GNUNET_SCHEDULER_NO_TASK, | ||
3344 | GNUNET_TIME_UNIT_SECONDS, | 3310 | GNUNET_TIME_UNIT_SECONDS, |
3345 | &core_connect_task, | 3311 | &core_connect_task, |
3346 | NULL); | 3312 | NULL); |
@@ -3412,9 +3378,6 @@ run (void *cls, | |||
3412 | GNUNET_SERVER_add_handlers (server, handlers); | 3378 | GNUNET_SERVER_add_handlers (server, handlers); |
3413 | core_connect_task (NULL, NULL); | 3379 | core_connect_task (NULL, NULL); |
3414 | GNUNET_SCHEDULER_add_delayed (sched, | 3380 | GNUNET_SCHEDULER_add_delayed (sched, |
3415 | GNUNET_YES, | ||
3416 | GNUNET_SCHEDULER_PRIORITY_IDLE, | ||
3417 | GNUNET_SCHEDULER_NO_TASK, | ||
3418 | GNUNET_TIME_UNIT_FOREVER_REL, | 3381 | GNUNET_TIME_UNIT_FOREVER_REL, |
3419 | &shutdown_task, | 3382 | &shutdown_task, |
3420 | NULL); | 3383 | NULL); |
@@ -3434,7 +3397,7 @@ main (int argc, char *const *argv) | |||
3434 | return (GNUNET_OK == | 3397 | return (GNUNET_OK == |
3435 | GNUNET_SERVICE_run (argc, | 3398 | GNUNET_SERVICE_run (argc, |
3436 | argv, | 3399 | argv, |
3437 | "fs", &run, NULL, NULL, NULL)) ? 0 : 1; | 3400 | "fs", &run, NULL)) ? 0 : 1; |
3438 | } | 3401 | } |
3439 | 3402 | ||
3440 | /* end of gnunet-service-fs.c */ | 3403 | /* end of gnunet-service-fs.c */ |
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index 04cd3e5d8..4e73ef182 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "gnunet_arm_service.h" | 29 | #include "gnunet_arm_service.h" |
30 | #include "gnunet_fs_service.h" | 30 | #include "gnunet_fs_service.h" |
31 | 31 | ||
32 | #define VERBOSE GNUNET_NO | 32 | #define VERBOSE GNUNET_YES |
33 | 33 | ||
34 | #define START_ARM GNUNET_YES | 34 | #define START_ARM GNUNET_YES |
35 | 35 | ||
@@ -133,7 +133,6 @@ progress_cb (void *cls, | |||
133 | printf ("Download complete, %llu kbps.\n", | 133 | printf ("Download complete, %llu kbps.\n", |
134 | (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024)); | 134 | (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024)); |
135 | GNUNET_SCHEDULER_add_continuation (sched, | 135 | GNUNET_SCHEDULER_add_continuation (sched, |
136 | GNUNET_NO, | ||
137 | &abort_download_task, | 136 | &abort_download_task, |
138 | NULL, | 137 | NULL, |
139 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 138 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -154,7 +153,6 @@ progress_cb (void *cls, | |||
154 | event->value.publish.specifics.error.message); | 153 | event->value.publish.specifics.error.message); |
155 | GNUNET_break (0); | 154 | GNUNET_break (0); |
156 | GNUNET_SCHEDULER_add_continuation (sched, | 155 | GNUNET_SCHEDULER_add_continuation (sched, |
157 | GNUNET_NO, | ||
158 | &abort_publish_task, | 156 | &abort_publish_task, |
159 | NULL, | 157 | NULL, |
160 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 158 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -164,7 +162,6 @@ progress_cb (void *cls, | |||
164 | "Error downloading file: %s\n", | 162 | "Error downloading file: %s\n", |
165 | event->value.download.specifics.error.message); | 163 | event->value.download.specifics.error.message); |
166 | GNUNET_SCHEDULER_add_continuation (sched, | 164 | GNUNET_SCHEDULER_add_continuation (sched, |
167 | GNUNET_NO, | ||
168 | &abort_download_task, | 165 | &abort_download_task, |
169 | NULL, | 166 | NULL, |
170 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 167 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -196,7 +193,6 @@ progress_cb (void *cls, | |||
196 | case GNUNET_FS_STATUS_DOWNLOAD_STOPPED: | 193 | case GNUNET_FS_STATUS_DOWNLOAD_STOPPED: |
197 | GNUNET_assert (download == event->value.download.dc); | 194 | GNUNET_assert (download == event->value.download.dc); |
198 | GNUNET_SCHEDULER_add_continuation (sched, | 195 | GNUNET_SCHEDULER_add_continuation (sched, |
199 | GNUNET_NO, | ||
200 | &abort_publish_task, | 196 | &abort_publish_task, |
201 | NULL, | 197 | NULL, |
202 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 198 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c index 868c9d71a..f9225e3ce 100644 --- a/src/fs/test_fs_list_indexed.c +++ b/src/fs/test_fs_list_indexed.c | |||
@@ -97,7 +97,6 @@ list_indexed_task (void *cls, | |||
97 | { | 97 | { |
98 | 98 | ||
99 | GNUNET_SCHEDULER_add_continuation (sched, | 99 | GNUNET_SCHEDULER_add_continuation (sched, |
100 | GNUNET_NO, | ||
101 | &abort_publish_task, | 100 | &abort_publish_task, |
102 | NULL, | 101 | NULL, |
103 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 102 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -120,7 +119,6 @@ progress_cb (void *cls, | |||
120 | if (0 == strcmp ("list_indexed-context-dir", | 119 | if (0 == strcmp ("list_indexed-context-dir", |
121 | event->value.publish.cctx)) | 120 | event->value.publish.cctx)) |
122 | GNUNET_SCHEDULER_add_continuation (sched, | 121 | GNUNET_SCHEDULER_add_continuation (sched, |
123 | GNUNET_NO, | ||
124 | &list_indexed_task, | 122 | &list_indexed_task, |
125 | NULL, | 123 | NULL, |
126 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 124 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -146,7 +144,6 @@ progress_cb (void *cls, | |||
146 | if (0 == strcmp ("list_indexed-context-dir", | 144 | if (0 == strcmp ("list_indexed-context-dir", |
147 | event->value.publish.cctx)) | 145 | event->value.publish.cctx)) |
148 | GNUNET_SCHEDULER_add_continuation (sched, | 146 | GNUNET_SCHEDULER_add_continuation (sched, |
149 | GNUNET_NO, | ||
150 | &abort_publish_task, | 147 | &abort_publish_task, |
151 | NULL, | 148 | NULL, |
152 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 149 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c index 1b79b941d..a7bcd48d9 100644 --- a/src/fs/test_fs_publish.c +++ b/src/fs/test_fs_publish.c | |||
@@ -106,7 +106,6 @@ progress_cb (void *cls, | |||
106 | if (0 == strcmp ("list_indexed-context-dir", | 106 | if (0 == strcmp ("list_indexed-context-dir", |
107 | event->value.publish.cctx)) | 107 | event->value.publish.cctx)) |
108 | GNUNET_SCHEDULER_add_continuation (sched, | 108 | GNUNET_SCHEDULER_add_continuation (sched, |
109 | GNUNET_NO, | ||
110 | &abort_publish_task, | 109 | &abort_publish_task, |
111 | NULL, | 110 | NULL, |
112 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 111 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -131,7 +130,6 @@ progress_cb (void *cls, | |||
131 | if (0 == strcmp ("list_indexed-context-dir", | 130 | if (0 == strcmp ("list_indexed-context-dir", |
132 | event->value.publish.cctx)) | 131 | event->value.publish.cctx)) |
133 | GNUNET_SCHEDULER_add_continuation (sched, | 132 | GNUNET_SCHEDULER_add_continuation (sched, |
134 | GNUNET_NO, | ||
135 | &abort_publish_task, | 133 | &abort_publish_task, |
136 | NULL, | 134 | NULL, |
137 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 135 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -171,7 +169,6 @@ progress_cb (void *cls, | |||
171 | { | 169 | { |
172 | GNUNET_assert (publish == event->value.publish.sc); | 170 | GNUNET_assert (publish == event->value.publish.sc); |
173 | GNUNET_SCHEDULER_add_continuation (sched, | 171 | GNUNET_SCHEDULER_add_continuation (sched, |
174 | GNUNET_NO, | ||
175 | &abort_publish_task, | 172 | &abort_publish_task, |
176 | NULL, | 173 | NULL, |
177 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 174 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c index d1b5f77aa..e0961c4a7 100644 --- a/src/fs/test_fs_search.c +++ b/src/fs/test_fs_search.c | |||
@@ -124,7 +124,6 @@ progress_cb (void *cls, | |||
124 | printf ("Search complete.\n"); | 124 | printf ("Search complete.\n"); |
125 | #endif | 125 | #endif |
126 | GNUNET_SCHEDULER_add_continuation (sched, | 126 | GNUNET_SCHEDULER_add_continuation (sched, |
127 | GNUNET_NO, | ||
128 | &abort_search_task, | 127 | &abort_search_task, |
129 | NULL, | 128 | NULL, |
130 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 129 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -135,7 +134,6 @@ progress_cb (void *cls, | |||
135 | event->value.publish.specifics.error.message); | 134 | event->value.publish.specifics.error.message); |
136 | GNUNET_break (0); | 135 | GNUNET_break (0); |
137 | GNUNET_SCHEDULER_add_continuation (sched, | 136 | GNUNET_SCHEDULER_add_continuation (sched, |
138 | GNUNET_NO, | ||
139 | &abort_publish_task, | 137 | &abort_publish_task, |
140 | NULL, | 138 | NULL, |
141 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 139 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -145,7 +143,6 @@ progress_cb (void *cls, | |||
145 | "Error searching file: %s\n", | 143 | "Error searching file: %s\n", |
146 | event->value.search.specifics.error.message); | 144 | event->value.search.specifics.error.message); |
147 | GNUNET_SCHEDULER_add_continuation (sched, | 145 | GNUNET_SCHEDULER_add_continuation (sched, |
148 | GNUNET_NO, | ||
149 | &abort_search_task, | 146 | &abort_search_task, |
150 | NULL, | 147 | NULL, |
151 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 148 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -174,7 +171,6 @@ progress_cb (void *cls, | |||
174 | case GNUNET_FS_STATUS_SEARCH_STOPPED: | 171 | case GNUNET_FS_STATUS_SEARCH_STOPPED: |
175 | GNUNET_assert (search == event->value.search.sc); | 172 | GNUNET_assert (search == event->value.search.sc); |
176 | GNUNET_SCHEDULER_add_continuation (sched, | 173 | GNUNET_SCHEDULER_add_continuation (sched, |
177 | GNUNET_NO, | ||
178 | &abort_publish_task, | 174 | &abort_publish_task, |
179 | NULL, | 175 | NULL, |
180 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 176 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index eb10c1db9..af9db7400 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c | |||
@@ -121,7 +121,6 @@ progress_cb (void *cls, | |||
121 | printf ("Unindex complete, %llu kbps.\n", | 121 | printf ("Unindex complete, %llu kbps.\n", |
122 | (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024)); | 122 | (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024)); |
123 | GNUNET_SCHEDULER_add_continuation (sched, | 123 | GNUNET_SCHEDULER_add_continuation (sched, |
124 | GNUNET_NO, | ||
125 | &abort_unindex_task, | 124 | &abort_unindex_task, |
126 | NULL, | 125 | NULL, |
127 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 126 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -142,7 +141,6 @@ progress_cb (void *cls, | |||
142 | event->value.publish.specifics.error.message); | 141 | event->value.publish.specifics.error.message); |
143 | GNUNET_break (0); | 142 | GNUNET_break (0); |
144 | GNUNET_SCHEDULER_add_continuation (sched, | 143 | GNUNET_SCHEDULER_add_continuation (sched, |
145 | GNUNET_NO, | ||
146 | &abort_publish_task, | 144 | &abort_publish_task, |
147 | NULL, | 145 | NULL, |
148 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 146 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -152,7 +150,6 @@ progress_cb (void *cls, | |||
152 | "Error unindexing file: %s\n", | 150 | "Error unindexing file: %s\n", |
153 | event->value.unindex.specifics.error.message); | 151 | event->value.unindex.specifics.error.message); |
154 | GNUNET_SCHEDULER_add_continuation (sched, | 152 | GNUNET_SCHEDULER_add_continuation (sched, |
155 | GNUNET_NO, | ||
156 | &abort_unindex_task, | 153 | &abort_unindex_task, |
157 | NULL, | 154 | NULL, |
158 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 155 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
@@ -181,7 +178,6 @@ progress_cb (void *cls, | |||
181 | case GNUNET_FS_STATUS_UNINDEX_STOPPED: | 178 | case GNUNET_FS_STATUS_UNINDEX_STOPPED: |
182 | GNUNET_assert (unindex == event->value.unindex.uc); | 179 | GNUNET_assert (unindex == event->value.unindex.uc); |
183 | GNUNET_SCHEDULER_add_continuation (sched, | 180 | GNUNET_SCHEDULER_add_continuation (sched, |
184 | GNUNET_NO, | ||
185 | &abort_publish_task, | 181 | &abort_publish_task, |
186 | NULL, | 182 | NULL, |
187 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 183 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |