-only trigger check config if we actually need it
[oweals/gnunet.git] / src / fs / gnunet-publish.c
index a0863dcbbd2a0153c582b532a823cbc43e42d4c8..a563d7b7a76d9e1c9baebde7ce73f9d5335aa732 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2001-2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2001-2013 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -146,11 +146,9 @@ static struct GNUNET_IDENTITY_Handle *identity;
  * FS state.
  *
  * @param cls NULL
- * @param tc scheduler context
  */
 static void
-do_stop_task (void *cls,
-              const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_stop_task (void *cls)
 {
   struct GNUNET_FS_PublishContext *p;
 
@@ -874,9 +872,8 @@ run (void *cls,
     ret = 1;
     return;
   }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                                &do_stop_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&do_stop_task,
+                                NULL);
   if (NULL != pseudonym)
     identity = GNUNET_IDENTITY_connect (cfg,
                                        &identity_cb,