refactor DHT for new service API
[oweals/gnunet.git] / src / nse / test_nse_api.c
index 324d4ff1679200013a3d4f5672d0ad4bbbfcecb2..22826b2981b4796b113dd8a17fd7cd3726405a26 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 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
@@ -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.
 */
 /**
  * @file nse/test_nse_api.c
 
 static struct GNUNET_NSE_Handle *h;
 
-static GNUNET_SCHEDULER_TaskIdentifier die_task;
+static struct GNUNET_SCHEDULER_Task * die_task;
 
 
 /**
  * Signature of the main function of a task.
  *
  * @param cls closure
- * @param tc context information (why was this task triggered now)
  */
 static void
-end_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+end_test (void *cls)
 {
   if (h != NULL)
   {
@@ -69,7 +68,7 @@ check_nse_message (void *cls, struct GNUNET_TIME_Absolute timestamp,
            estimate, std_dev);
   /* Fantastic check below. Expect NaN, the only thing not equal to itself. */
   (*ok) = 0;
-  if (die_task != GNUNET_SCHEDULER_NO_TASK)
+  if (die_task != NULL)
     GNUNET_SCHEDULER_cancel (die_task);
   die_task = GNUNET_SCHEDULER_add_now (&end_test, NULL);
 }