_
("Hash mismatch trying to index file `%s' which has hash `%s'\n"),
ii->filename, GNUNET_h2s (res));
-#if DEBUG_FS
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Wanted `%s'\n",
GNUNET_h2s (&ii->file_id));
-#endif
GNUNET_SERVER_transmit_context_append_data (ii->tc, NULL, 0,
GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED);
GNUNET_SERVER_transmit_context_run (ii->tc, GNUNET_TIME_UNIT_MINUTES);
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;
GNUNET_free (fn);
return;
}
-#if DEBUG_FS
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Mismatch in file identifiers (%llu != %llu or %u != %u), need to hash.\n",
(unsigned long long) ino, (unsigned long long) myino,
(unsigned int) dev, (unsigned int) mydev);
-#endif
/* slow validation, need to hash full file (again) */
ii->fhc =
GNUNET_CRYPTO_hash_file (GNUNET_SCHEDULER_PRIORITY_IDLE, fn,
}
pos = next;
}
-#if DEBUG_FS
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Client requested unindexing of file `%s': %s\n",
GNUNET_h2s (&um->file_id), found ? "found" : "not found");
-#endif
if (GNUNET_YES == found)
write_index_list ();
tc = GNUNET_SERVER_transmit_context_create (client);
*
* @param cls unused
* @param success did the deletion work?
+ * @param min_expiration minimum expiration time required for content to be stored
* @param msg error message
*/
static void
-remove_cont (void *cls, int success, const char *msg)
+remove_cont (void *cls, int success,
+ struct GNUNET_TIME_Absolute min_expiration,
+ const char *msg)
{
if (GNUNET_OK != success)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
odb = (const struct OnDemandBlock *) data;
off = GNUNET_ntohll (odb->offset);
fn = (const char *) GNUNET_CONTAINER_multihashmap_get (ifm, &odb->file_id);
- if (0 != ACCESS (fn, R_OK))
+ if ((NULL == fn) || (0 != ACCESS (fn, R_OK)))
{
GNUNET_STATISTICS_update (GSF_stats,
- gettext_noop ("# index blocks removed: original file inaccessible"),
- 1,
- GNUNET_YES);
+ gettext_noop
+ ("# index blocks removed: original file inaccessible"),
+ 1, GNUNET_YES);
GNUNET_DATASTORE_remove (dsh, key, size, data, -1, -1,
GNUNET_TIME_UNIT_FOREVER_REL, &remove_cont, NULL);
return GNUNET_SYSERR;
}
- fh = NULL;
- if ((NULL == fn) ||
- (NULL ==
+ if ((NULL ==
(fh =
GNUNET_DISK_file_open (fn, GNUNET_DISK_OPEN_READ,
GNUNET_DISK_PERM_NONE))) ||
GNUNET_TIME_UNIT_FOREVER_REL, &remove_cont, NULL);
return GNUNET_SYSERR;
}
-#if DEBUG_FS
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"On-demand encoded block for query `%s'\n", GNUNET_h2s (key));
-#endif
cont (cont_cls, key, nsize, edata, GNUNET_BLOCK_TYPE_FS_DBLOCK, priority,
anonymity, expiration, uid);
return GNUNET_OK;