plugin datastore mysql
[oweals/gnunet.git] / src / pt / gnunet-daemon-pt.c
index 72fef144a8a707619e9cca7d83c637d6253ce86c..02c0df3cc7d4d06ae2b7bec51cc440b163de8ead 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2010, 2012 Christian Grothoff
+     Copyright (C) 2010, 2012 Christian Grothoff
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      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.
 */
 
 /**
@@ -228,7 +228,7 @@ struct RequestContext
   /**
    * Task used to abort this operation with timeout.
    */
-  struct GNUNET_SCHEDULER_Task * timeout_task;
+  struct GNUNET_SCHEDULER_Task *timeout_task;
 
   /**
    * Length of the request message that follows this struct.
@@ -800,11 +800,9 @@ transmit_dns_request_to_cadet (void *cls,
  * Task run if the time to answer a DNS request via CADET is over.
  *
  * @param cls the `struct RequestContext` to abort
- * @param tc scheduler context
  */
 static void
-timeout_request (void *cls,
-                const struct GNUNET_SCHEDULER_TaskContext *tc)
+timeout_request (void *cls)
 {
   struct RequestContext *rc = cls;
   struct CadetExit *exit = rc->exit;
@@ -1023,11 +1021,9 @@ abort_all_requests (struct CadetExit *exit)
  * Function scheduled as very last function, cleans up after us
  *
  * @param cls closure, NULL
- * @param tskctx scheduler context, unused
  */
 static void
-cleanup (void *cls,
-         const struct GNUNET_SCHEDULER_TaskContext *tskctx)
+cleanup (void *cls)
 {
   struct CadetExit *exit;
 
@@ -1248,7 +1244,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup, cls);
+  GNUNET_SCHEDULER_add_shutdown (&cleanup, cls);
   if (ipv4_pt || ipv6_pt)
   {
     dns_post_handle