/** * Function called once the hash of the file * that is being unindexed has been computed. * * @param cls closure, unindex context * @param file_id computed hash, NULL on error */ void GNUNET_FS_unindex_process_hash_ (void *cls, const struct GNUNET_HashCode *file_id) { struct GNUNET_FS_UnindexContext *uc = cls; uc->fhc = NULL; if (uc->state != UNINDEX_STATE_HASHING) { GNUNET_FS_unindex_stop (uc); return; } if (file_id == NULL) { uc->state = UNINDEX_STATE_ERROR; uc->emsg = GNUNET_strdup (_("Failed to compute hash of file.")); GNUNET_FS_unindex_sync_ (uc); signal_unindex_error (uc); return; } uc->file_id = *file_id; uc->state = UNINDEX_STATE_DS_REMOVE; GNUNET_FS_unindex_sync_ (uc); GNUNET_FS_unindex_do_remove_ (uc); }
static void abort_unindex_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { GNUNET_FS_unindex_stop (unindex); unindex = NULL; GNUNET_DISK_directory_remove (fn); GNUNET_free (fn); fn = NULL; }
static void shutdown_task (void *cls) { struct GNUNET_FS_UnindexContext *u; if (uc != NULL) { u = uc; uc = NULL; GNUNET_FS_unindex_stop (u); } }
static void shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct GNUNET_FS_UnindexContext *u; if (uc != NULL) { u = uc; uc = NULL; GNUNET_FS_unindex_stop (u); } }