diff options
Diffstat (limited to 'src/fs/fs.c')
-rw-r--r-- | src/fs/fs.c | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/src/fs/fs.c b/src/fs/fs.c index e26a01996..fc1388a04 100644 --- a/src/fs/fs.c +++ b/src/fs/fs.c | |||
@@ -72,8 +72,8 @@ stop_job (struct GNUNET_FS_QueueEntry *qe) | |||
72 | qe->h->active_blocks -= qe->blocks; | 72 | qe->h->active_blocks -= qe->blocks; |
73 | qe->run_time = | 73 | qe->run_time = |
74 | GNUNET_TIME_relative_add (qe->run_time, | 74 | GNUNET_TIME_relative_add (qe->run_time, |
75 | GNUNET_TIME_absolute_get_duration (qe-> | 75 | GNUNET_TIME_absolute_get_duration |
76 | start_time)); | 76 | (qe->start_time)); |
77 | GNUNET_CONTAINER_DLL_remove (qe->h->running_head, qe->h->running_tail, qe); | 77 | GNUNET_CONTAINER_DLL_remove (qe->h->running_head, qe->h->running_tail, qe); |
78 | GNUNET_CONTAINER_DLL_insert_after (qe->h->pending_head, qe->h->pending_tail, | 78 | GNUNET_CONTAINER_DLL_insert_after (qe->h->pending_head, qe->h->pending_tail, |
79 | qe->h->pending_tail, qe); | 79 | qe->h->pending_tail, qe); |
@@ -638,12 +638,8 @@ read_start_time (struct GNUNET_BIO_ReadHandle *rh, | |||
638 | * the infromation | 638 | * the infromation |
639 | * @return NULL on error | 639 | * @return NULL on error |
640 | */ | 640 | */ |
641 | static struct GNUNET_FS_FileInformation *deserialize_file_information (struct | 641 | static struct GNUNET_FS_FileInformation * |
642 | GNUNET_FS_Handle | 642 | deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename); |
643 | *h, | ||
644 | const | ||
645 | char | ||
646 | *filename); | ||
647 | 643 | ||
648 | 644 | ||
649 | /** | 645 | /** |
@@ -1152,8 +1148,8 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi) | |||
1152 | (GNUNET_OK != | 1148 | (GNUNET_OK != |
1153 | GNUNET_BIO_write_string (wh, | 1149 | GNUNET_BIO_write_string (wh, |
1154 | (fi->data.dir.entries == | 1150 | (fi->data.dir.entries == |
1155 | NULL) ? NULL : fi->data.dir.entries-> | 1151 | NULL) ? NULL : fi->data.dir. |
1156 | serialization))) | 1152 | entries->serialization))) |
1157 | { | 1153 | { |
1158 | GNUNET_break (0); | 1154 | GNUNET_break (0); |
1159 | goto cleanup; | 1155 | goto cleanup; |
@@ -1566,9 +1562,9 @@ read_download_request (struct GNUNET_BIO_ReadHandle *rh) | |||
1566 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->num_children)) || | 1562 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->num_children)) || |
1567 | (dr->num_children > CHK_PER_INODE) || | 1563 | (dr->num_children > CHK_PER_INODE) || |
1568 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->depth)) || ((dr->depth == 0) | 1564 | (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->depth)) || ((dr->depth == 0) |
1569 | && (dr-> | 1565 | && |
1570 | num_children | 1566 | (dr->num_children |
1571 | > 0)) || | 1567 | > 0)) || |
1572 | ((dr->depth > 0) && (dr->num_children == 0))) | 1568 | ((dr->depth > 0) && (dr->num_children == 0))) |
1573 | { | 1569 | { |
1574 | GNUNET_break (0); | 1570 | GNUNET_break (0); |
@@ -2017,11 +2013,12 @@ cleanup: | |||
2017 | * @param search associated search | 2013 | * @param search associated search |
2018 | * @param serialization name under which the search was serialized | 2014 | * @param serialization name under which the search was serialized |
2019 | */ | 2015 | */ |
2020 | static void deserialize_download (struct GNUNET_FS_Handle *h, | 2016 | static void |
2021 | struct GNUNET_BIO_ReadHandle *rh, | 2017 | deserialize_download (struct GNUNET_FS_Handle *h, |
2022 | struct GNUNET_FS_DownloadContext *parent, | 2018 | struct GNUNET_BIO_ReadHandle *rh, |
2023 | struct GNUNET_FS_SearchResult *search, | 2019 | struct GNUNET_FS_DownloadContext *parent, |
2024 | const char *serialization); | 2020 | struct GNUNET_FS_SearchResult *search, |
2021 | const char *serialization); | ||
2025 | 2022 | ||
2026 | 2023 | ||
2027 | /** | 2024 | /** |
@@ -2032,16 +2029,11 @@ static void deserialize_download (struct GNUNET_FS_Handle *h, | |||
2032 | * @param psearch_result parent search result | 2029 | * @param psearch_result parent search result |
2033 | * @param serialization name under which the search was serialized | 2030 | * @param serialization name under which the search was serialized |
2034 | */ | 2031 | */ |
2035 | static struct GNUNET_FS_SearchContext *deserialize_search (struct | 2032 | static struct GNUNET_FS_SearchContext * |
2036 | GNUNET_FS_Handle *h, | 2033 | deserialize_search (struct GNUNET_FS_Handle *h, |
2037 | struct | 2034 | struct GNUNET_BIO_ReadHandle *rh, |
2038 | GNUNET_BIO_ReadHandle | 2035 | struct GNUNET_FS_SearchResult *psearch_result, |
2039 | *rh, | 2036 | const char *serialization); |
2040 | struct | ||
2041 | GNUNET_FS_SearchResult | ||
2042 | *psearch_result, | ||
2043 | const char | ||
2044 | *serialization); | ||
2045 | 2037 | ||
2046 | 2038 | ||
2047 | /** | 2039 | /** |
@@ -2203,7 +2195,8 @@ signal_download_resume (struct GNUNET_FS_DownloadContext *dc) | |||
2203 | * | 2195 | * |
2204 | * @param sc search being resumed | 2196 | * @param sc search being resumed |
2205 | */ | 2197 | */ |
2206 | static void signal_search_resume (struct GNUNET_FS_SearchContext *sc); | 2198 | static void |
2199 | signal_search_resume (struct GNUNET_FS_SearchContext *sc); | ||
2207 | 2200 | ||
2208 | 2201 | ||
2209 | /** | 2202 | /** |
@@ -2255,7 +2248,8 @@ signal_result_resume (void *cls, const GNUNET_HashCode * key, void *value) | |||
2255 | * | 2248 | * |
2256 | * @param sc search context to free | 2249 | * @param sc search context to free |
2257 | */ | 2250 | */ |
2258 | static void free_search_context (struct GNUNET_FS_SearchContext *sc); | 2251 | static void |
2252 | free_search_context (struct GNUNET_FS_SearchContext *sc); | ||
2259 | 2253 | ||
2260 | 2254 | ||
2261 | /** | 2255 | /** |