aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_indexing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-service-fs_indexing.c')
-rw-r--r--src/fs/gnunet-service-fs_indexing.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c
index ca9a226a2..525da1a91 100644
--- a/src/fs/gnunet-service-fs_indexing.c
+++ b/src/fs/gnunet-service-fs_indexing.c
@@ -22,9 +22,6 @@
22 * @file fs/gnunet-service-fs_indexing.c 22 * @file fs/gnunet-service-fs_indexing.c
23 * @brief program that provides indexing functions of the file-sharing service 23 * @brief program that provides indexing functions of the file-sharing service
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 *
26 * TODO:
27 * - indexed files/blocks not removed on errors
28 */ 25 */
29#include "platform.h" 26#include "platform.h"
30#include <float.h> 27#include <float.h>
@@ -180,7 +177,7 @@ read_index_list ()
180 } 177 }
181 if (GNUNET_NO == GNUNET_DISK_file_test (fn)) 178 if (GNUNET_NO == GNUNET_DISK_file_test (fn))
182 { 179 {
183 /* no index info yet */ 180 /* no index info yet */
184 GNUNET_free (fn); 181 GNUNET_free (fn);
185 return; 182 return;
186 } 183 }
@@ -596,8 +593,12 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
596 STRERROR (errno)); 593 STRERROR (errno));
597 if (fh != NULL) 594 if (fh != NULL)
598 GNUNET_DISK_file_close (fh); 595 GNUNET_DISK_file_close (fh);
599 /* FIXME: if this happens often, we need 596 GNUNET_FS_drq_remove (key,
600 to remove the OnDemand block from the DS! */ 597 size,
598 data,
599 &remove_cont,
600 NULL,
601 GNUNET_TIME_UNIT_FOREVER_REL);
601 return GNUNET_SYSERR; 602 return GNUNET_SYSERR;
602 } 603 }
603 GNUNET_DISK_file_close (fh); 604 GNUNET_DISK_file_close (fh);
@@ -621,8 +622,12 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
621 _("Indexed file `%s' changed at offset %llu\n"), 622 _("Indexed file `%s' changed at offset %llu\n"),
622 fn, 623 fn,
623 (unsigned long long) off); 624 (unsigned long long) off);
624 /* FIXME: if this happens often, we need 625 GNUNET_FS_drq_remove (key,
625 to remove the OnDemand block from the DS! */ 626 size,
627 data,
628 &remove_cont,
629 NULL,
630 GNUNET_TIME_UNIT_FOREVER_REL);
626 return GNUNET_SYSERR; 631 return GNUNET_SYSERR;
627 } 632 }
628#if DEBUG_FS 633#if DEBUG_FS