-only trigger check config if we actually need it
[oweals/gnunet.git] / src / dht / gnunet-service-xdht.c
index 77e1d52e1c953bfaba167376017d7c7f6de27212..e7b2c50c4e89c4a893c384759ff75e72d5aa9de0 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
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
-
 /**
  * @file dht/gnunet-service-xdht.c
  * @brief GNUnet DHT service
  * @author Christian Grothoff
  * @author Nathan Evans
  */
-
 #include "platform.h"
 #include "gnunet_block_lib.h"
 #include "gnunet_util_lib.h"
@@ -61,22 +59,14 @@ const struct GNUNET_CONFIGURATION_Handle *GDS_cfg;
  */
 extern unsigned int track_topology;
 
-#if ENABLE_MALICIOUS
-/**
- * Should this peer act malicious?
- */
-unsigned int malicious;
-#endif
-
 
 /**
  * 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 ();
@@ -123,12 +113,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *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);
 }