allow empty/NULL context message
[oweals/gnunet.git] / src / namestore / gnunet-namestore-fcfsd.c
index 720d3738f2f6b2ed851be6694264b6feaf502a77..c2f506f6d3b8cbb9bdd5cc1a53377ccebb615ea6 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2012-2014 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012-2014 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
@@ -112,7 +112,7 @@ struct Request
   /**
    * Associated session.
    */
-  struct Session *session;
+  // FIXME: struct Session *session;
 
   /**
    * Post processor handling form data (IF this is
@@ -226,11 +226,9 @@ static unsigned long long port;
  * Task run whenever HTTP server operations are pending.
  *
  * @param cls unused
- * @param tc scheduler context
  */
 static void
-do_httpd (void *cls,
-         const struct GNUNET_SCHEDULER_TaskContext *tc);
+do_httpd (void *cls);
 
 
 /**
@@ -840,11 +838,9 @@ run_httpd ()
  * Task run whenever HTTP server operations are pending.
  *
  * @param cls unused
- * @param tc scheduler context
  */
 static void
-do_httpd (void *cls,
-         const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_httpd (void *cls)
 {
   httpd_task = NULL;
   MHD_run (httpd);
@@ -856,11 +852,9 @@ do_httpd (void *cls,
  * Task run on shutdown.  Cleans up everything.
  *
  * @param cls unused
- * @param tc scheduler context
  */
 static void
-do_shutdown (void *cls,
-            const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_shutdown (void *cls)
 {
   if (NULL != httpd_task)
   {
@@ -994,8 +988,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   }
   id_op = GNUNET_IDENTITY_get (identity, "fcfsd",
                               &identity_cb, NULL);
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                               &do_shutdown, NULL);
+  GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
 }