-fix off-by-1
[oweals/gnunet.git] / src / dht / gnunet-service-wdht.c
index 23fe6cf470e8f7d10d94ab8e90f92ace59651c82..b58bb729d514835fda4885181c6c62ec84f71e27 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009, 2010, 2011 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
@@ -60,10 +60,9 @@ const struct GNUNET_CONFIGURATION_Handle *GDS_cfg;
  * 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)
 {
   GDS_NEIGHBOURS_done ();
   GDS_DATACACHE_done ();
@@ -100,12 +99,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   GDS_CLIENTS_init (server);
   if (GNUNET_OK != GDS_NEIGHBOURS_init ())
   {
-    shutdown_task (NULL, NULL);
+    shutdown_task (NULL);
     return;
   }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                                &shutdown_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+                                NULL);
 }