diff options
Diffstat (limited to 'src/fs/gnunet-service-fs_indexing.c')
-rw-r--r-- | src/fs/gnunet-service-fs_indexing.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c index 98fca3ec5..f4d560176 100644 --- a/src/fs/gnunet-service-fs_indexing.c +++ b/src/fs/gnunet-service-fs_indexing.c | |||
@@ -123,7 +123,7 @@ write_index_list () | |||
123 | "INDEXDB"); | 123 | "INDEXDB"); |
124 | return; | 124 | return; |
125 | } | 125 | } |
126 | wh = GNUNET_BIO_write_open (fn); | 126 | wh = GNUNET_BIO_write_open_file (fn); |
127 | if (NULL == wh) | 127 | if (NULL == wh) |
128 | { | 128 | { |
129 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | 129 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, |
@@ -134,11 +134,14 @@ write_index_list () | |||
134 | } | 134 | } |
135 | for (pos = indexed_files_head; NULL != pos; pos = pos->next) | 135 | for (pos = indexed_files_head; NULL != pos; pos = pos->next) |
136 | if ((GNUNET_OK != GNUNET_BIO_write (wh, | 136 | if ((GNUNET_OK != GNUNET_BIO_write (wh, |
137 | "fs-indexing-file-id", | ||
137 | &pos->file_id, | 138 | &pos->file_id, |
138 | sizeof(struct GNUNET_HashCode))) || | 139 | sizeof(struct GNUNET_HashCode))) || |
139 | (GNUNET_OK != GNUNET_BIO_write_string (wh, pos->filename))) | 140 | (GNUNET_OK != GNUNET_BIO_write_string (wh, |
141 | "fs-indexing-filename", | ||
142 | pos->filename))) | ||
140 | break; | 143 | break; |
141 | if (GNUNET_OK != GNUNET_BIO_write_close (wh)) | 144 | if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) |
142 | { | 145 | { |
143 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | 146 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, |
144 | _ ("Error writing `%s'.\n"), | 147 | _ ("Error writing `%s'.\n"), |
@@ -178,7 +181,7 @@ read_index_list () | |||
178 | GNUNET_free (fn); | 181 | GNUNET_free (fn); |
179 | return; | 182 | return; |
180 | } | 183 | } |
181 | rh = GNUNET_BIO_read_open (fn); | 184 | rh = GNUNET_BIO_read_open_file (fn); |
182 | if (NULL == rh) | 185 | if (NULL == rh) |
183 | { | 186 | { |
184 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | 187 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, |