* Task run during shutdown.
*
* @param cls unused
- * @param tc unused
*/
static void
-shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
{
struct Pattern *p;
* Task run when a publish operation should be stopped.
*
* @param cls the 'struct Pattern' of the publish operation to stop
- * @param tc unused
*/
static void
-publish_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+publish_stop_task (void *cls)
{
struct Pattern *p = cls;
* Task run when a download operation should be stopped.
*
* @param cls the 'struct Pattern' of the download operation to stop
- * @param tc unused
*/
static void
-download_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+download_stop_task (void *cls)
{
struct Pattern *p = cls;
* Task run when a download operation should be stopped.
*
* @param cls the 'struct Pattern' of the download operation to stop
- * @param tc unused
*/
static void
-search_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+search_stop_task (void *cls)
{
struct Pattern *p = cls;
* Start publish operation.
*
* @param cls the 'struct Pattern' specifying the operation to perform
- * @param tc scheduler context
*/
static void
-start_publish (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+start_publish (void *cls)
{
struct Pattern *p = cls;
struct GNUNET_FS_FileInformation *fi;
p->task = NULL;
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
fi = make_file (p->x, p->y, p);
p->start_time = GNUNET_TIME_absolute_get ();
p->ctx = GNUNET_FS_publish_start (fs_handle,
* Start download operation.
*
* @param cls the 'struct Pattern' specifying the operation to perform
- * @param tc scheduler context
*/
static void
-start_download (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+start_download (void *cls)
{
struct Pattern *p = cls;
struct GNUNET_FS_Uri *keywords;
p->task = NULL;
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
keywords = make_keywords (p->x);
p->start_time = GNUNET_TIME_absolute_get ();
p->sctx = GNUNET_FS_search_start (fs_handle, keywords,
cfg = cfg_;
/* Scheduled the task to clean up when shutdown is called */
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
- NULL);
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+ NULL);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_number (cfg,