-only trigger check config if we actually need it
[oweals/gnunet.git] / src / fs / gnunet-download.c
index 85afbe60692a9f4422789f1db705e9c95ddab26d..6d9adb8abe46db55bb120291db753818d0683da7 100644 (file)
@@ -54,7 +54,7 @@ static int local_only;
 
 
 static void
-cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleanup_task (void *cls)
 {
   GNUNET_FS_stop (ctx);
   ctx = NULL;
@@ -62,7 +62,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 
 static void
-shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
 {
   if (NULL != dc)
   {
@@ -284,8 +284,8 @@ run (void *cls, char *const *args, const char *cfgfile,
     ctx = NULL;
     return;
   }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+                                NULL);
 }