*/
uint64_t offset;
- /**
- * Run on shutdown?
- */
- int run_on_shutdown;
-
/**
* File descriptor.
*/
return;
}
GNUNET_SCHEDULER_add_after (tc->sched,
- fhc->run_on_shutdown,
- GNUNET_SCHEDULER_PRIORITY_KEEP,
GNUNET_SCHEDULER_NO_TASK, &file_hash_task, fhc);
}
*
* @param sched scheduler to use
* @param priority scheduling priority to use
- * @param run_on_shutdown should we complete even on shutdown?
* @param filename name of file to hash
* @param blocksize number of bytes to process in one task
* @param callback function to call upon completion
void
GNUNET_CRYPTO_hash_file (struct GNUNET_SCHEDULER_Handle *sched,
enum GNUNET_SCHEDULER_Priority priority,
- int run_on_shutdown,
const char *filename,
size_t blocksize,
GNUNET_CRYPTO_HashCompletedCallback callback,
file_hash_finish (fhc, NULL);
return;
}
- fhc->run_on_shutdown = run_on_shutdown;
fhc->fh = GNUNET_DISK_file_open (filename,
GNUNET_DISK_OPEN_READ,
GNUNET_DISK_PERM_NONE);
file_hash_finish (fhc, NULL);
return;
}
- GNUNET_SCHEDULER_add_after (sched,
- run_on_shutdown,
- priority,
- GNUNET_SCHEDULER_NO_TASK, &file_hash_task, fhc);
+ GNUNET_SCHEDULER_add_with_priority (sched, priority, &file_hash_task, fhc);
}