-only trigger check config if we actually need it
[oweals/gnunet.git] / src / fs / gnunet-auto-share.c
index aef66614cee22626655054fe1fc6dbac2e396d1c..96f86bf5d43c3347ed01b44ce8336dcd4026859c 100644 (file)
@@ -94,11 +94,6 @@ static int disable_extractor;
  */
 static int do_disable_creation_time;
 
-/**
- * Handle for the 'shutdown' task.
- */
-static struct GNUNET_SCHEDULER_Task *kill_task;
-
 /**
  * Handle for the main task that does scanning and working.
  */
@@ -321,7 +316,6 @@ save_state ()
 static void
 do_stop_task (void *cls)
 {
-  kill_task = NULL;
   do_shutdown = GNUNET_YES;
   if (NULL != publish_proc)
   {
@@ -729,10 +723,8 @@ run (void *cls,
   run_task = GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
                                                 &scan,
                                                 NULL);
-  kill_task =
-      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                                   &do_stop_task,
-                                    NULL);
+  GNUNET_SCHEDULER_add_shutdown (&do_stop_task,
+                                NULL);
 }