fix #4546
[oweals/gnunet.git] / src / dv / gnunet-service-dv.c
index 2ddd9919758a9e17ab6118ede7be20d87d5225cc..df95fd67b36f5498ffdb72ab5bfbfba2325f231c 100644 (file)
@@ -398,11 +398,9 @@ static int in_shutdown;
  *
  * @param cls the 'struct DirectNeighbor' of the peer we're building
  *        a routing consensus with
- * @param tc scheduler context
  */
 static void
-initiate_set_union (void *cls,
-                   const struct GNUNET_SCHEDULER_TaskContext *tc);
+initiate_set_union (void *cls);
 
 
 /**
@@ -1132,11 +1130,9 @@ refresh_routes (void *cls,
  * Task to run #refresh_routes() on all direct neighbours.
  *
  * @param cls NULL
- * @param tc unused
  */
 static void
-refresh_routes_task (void *cls,
-                     const struct GNUNET_SCHEDULER_TaskContext *tc)
+refresh_routes_task (void *cls)
 {
   rr_task = NULL;
   GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors,
@@ -1692,11 +1688,9 @@ listen_set_union (void *cls,
  *
  * @param cls the `struct DirectNeighbor *` of the peer we're building
  *        a routing consensus with
- * @param tc scheduler context
  */
 static void
-initiate_set_union (void *cls,
-                   const struct GNUNET_SCHEDULER_TaskContext *tc)
+initiate_set_union (void *cls)
 {
   struct DirectNeighbor *neighbor = cls;
 
@@ -2082,11 +2076,9 @@ free_direct_neighbors (void *cls,
  * 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)
 {
   unsigned int i;
 
@@ -2237,8 +2229,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
                                                  MAX_QUEUE_SIZE_PLUGIN);
   stats = GNUNET_STATISTICS_create ("dv", cfg);
   GNUNET_SERVER_add_handlers (server, plugin_handlers);
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                               &shutdown_task, NULL);
+  GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL);
 }