#include "gnunet-service-fs_indexing.h"
#include "fs.h"
-#define DEBUG_FS GNUNET_YES
+#define DEBUG_FS GNUNET_NO
/**
* In-memory information about indexed files (also available
GNUNET_free (fn);
return;
}
-
while ( (GNUNET_OK ==
GNUNET_BIO_read (rh,
"Hash of indexed file",
}
ism = (const struct IndexStartMessage*) message;
fn = GNUNET_STRINGS_filename_expand ((const char*) &ism[1]);
+ if (fn == NULL)
+ {
+ GNUNET_SERVER_receive_done (client,
+ GNUNET_SYSERR);
+ return;
+ }
dev = ntohl (ism->device);
ino = GNUNET_ntohll (ism->inode);
ism = (const struct IndexStartMessage*) message;
struct IndexInfo *next;
struct GNUNET_SERVER_TransmitContext *tc;
int found;
-
+
um = (const struct UnindexMessage*) message;
found = GNUNET_NO;
prev = NULL;
indexed_files = next;
else
prev->next = next;
+ GNUNET_break (GNUNET_OK ==
+ GNUNET_CONTAINER_multihashmap_remove (ifm,
+ &pos->file_id,
+ (void*) pos->filename));
GNUNET_free (pos);
found = GNUNET_YES;
}
GNUNET_h2s (&odb->file_id),
fn,
(unsigned long long) off,
- STRERROR (errno));
+ (fn == NULL) ? _("not indexed") : STRERROR (errno));
if (fh != NULL)
GNUNET_DISK_file_close (fh);
GNUNET_DATASTORE_remove (dsh,