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;
ii->filename = (const char*) &ii[1];
memcpy (&ii[1], fn, slen);
ii->file_id = ism->file_id;
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received `%s' message for file `%s'\n",
+ "START_INDEX",
+ ii->filename);
+#endif
+
ii->tc = GNUNET_SERVER_transmit_context_create (client);
mydev = 0;
myino = 0;
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;
}
sizeof (ndata)))) )
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Could not access indexed file `%s' at offset %llu: %s\n"),
+ _("Could not access indexed file `%s' (%s) at offset %llu: %s\n"),
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,