aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r--src/fs/fs_api.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index 7e769483b..a5b82ec27 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -1647,7 +1647,9 @@ deserialize_publish_file (void *cls,
1647 filename, emsg); 1647 filename, emsg);
1648 GNUNET_free (emsg); 1648 GNUNET_free (emsg);
1649 } 1649 }
1650 pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc); 1650 pc->top = GNUNET_FS_make_top (h,
1651 &GNUNET_FS_publish_signal_suspend_,
1652 pc);
1651 return GNUNET_OK; 1653 return GNUNET_OK;
1652cleanup: 1654cleanup:
1653 GNUNET_free_non_null (pc->nid); 1655 GNUNET_free_non_null (pc->nid);
@@ -2278,7 +2280,9 @@ deserialize_unindex_file (void *cls,
2278 GNUNET_break (0); 2280 GNUNET_break (0);
2279 goto cleanup; 2281 goto cleanup;
2280 } 2282 }
2281 uc->top = GNUNET_FS_make_top (h, &GNUNET_FS_unindex_signal_suspend_, uc); 2283 uc->top = GNUNET_FS_make_top (h,
2284 &GNUNET_FS_unindex_signal_suspend_,
2285 uc);
2282 pi.status = GNUNET_FS_STATUS_UNINDEX_RESUME; 2286 pi.status = GNUNET_FS_STATUS_UNINDEX_RESUME;
2283 pi.value.unindex.specifics.resume.message = uc->emsg; 2287 pi.value.unindex.specifics.resume.message = uc->emsg;
2284 GNUNET_FS_unindex_make_status_ (&pi, uc, 2288 GNUNET_FS_unindex_make_status_ (&pi, uc,
@@ -2537,7 +2541,6 @@ signal_download_resume (struct GNUNET_FS_DownloadContext *dc)
2537 signal_download_resume (dcc); 2541 signal_download_resume (dcc);
2538 dcc = dcc->next; 2542 dcc = dcc->next;
2539 } 2543 }
2540 GNUNET_FS_download_start_downloading_ (dc);
2541} 2544}
2542 2545
2543 2546
@@ -2806,7 +2809,8 @@ deserialize_download (struct GNUNET_FS_Handle *h,
2806 GNUNET_FS_compute_depth (GNUNET_FS_uri_chk_get_file_size (dc->uri)); 2809 GNUNET_FS_compute_depth (GNUNET_FS_uri_chk_get_file_size (dc->uri));
2807 if (GNUNET_FS_uri_test_loc (dc->uri)) 2810 if (GNUNET_FS_uri_test_loc (dc->uri))
2808 GNUNET_assert (GNUNET_OK == 2811 GNUNET_assert (GNUNET_OK ==
2809 GNUNET_FS_uri_loc_get_peer_identity (dc->uri, &dc->target)); 2812 GNUNET_FS_uri_loc_get_peer_identity (dc->uri,
2813 &dc->target));
2810 if (NULL == dc->emsg) 2814 if (NULL == dc->emsg)
2811 { 2815 {
2812 dc->top_request = read_download_request (rh); 2816 dc->top_request = read_download_request (rh);
@@ -2816,10 +2820,14 @@ deserialize_download (struct GNUNET_FS_Handle *h,
2816 goto cleanup; 2820 goto cleanup;
2817 } 2821 }
2818 } 2822 }
2819 dn = get_download_sync_filename (dc, dc->serialization, ".dir"); 2823 dn = get_download_sync_filename (dc,
2824 dc->serialization,
2825 ".dir");
2820 if (NULL != dn) 2826 if (NULL != dn)
2821 { 2827 {
2822 if (GNUNET_YES == GNUNET_DISK_directory_test (dn, GNUNET_YES)) 2828 if (GNUNET_YES ==
2829 GNUNET_DISK_directory_test (dn,
2830 GNUNET_YES))
2823 GNUNET_DISK_directory_scan (dn, 2831 GNUNET_DISK_directory_scan (dn,
2824 &deserialize_subdownload, 2832 &deserialize_subdownload,
2825 dc); 2833 dc);
@@ -2836,15 +2844,17 @@ deserialize_download (struct GNUNET_FS_Handle *h,
2836 dc->search = search; 2844 dc->search = search;
2837 search->download = dc; 2845 search->download = dc;
2838 } 2846 }
2839 if ((NULL == parent) && (NULL == search)) 2847 if ( (NULL == parent) &&
2848 (NULL == search) )
2840 { 2849 {
2841 dc->top = 2850 dc->top
2842 GNUNET_FS_make_top (dc->h, 2851 = GNUNET_FS_make_top (dc->h,
2843 &GNUNET_FS_download_signal_suspend_, 2852 &GNUNET_FS_download_signal_suspend_,
2844 dc); 2853 dc);
2845 signal_download_resume (dc); 2854 signal_download_resume (dc);
2846 } 2855 }
2847 GNUNET_free (uris); 2856 GNUNET_free (uris);
2857 GNUNET_assert (NULL == dc->job_queue);
2848 dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, 2858 dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_,
2849 dc); 2859 dc);
2850 return; 2860 return;