-improve UDP logging
[oweals/gnunet.git] / src / regex / test_regex_api.c
index 81627e6e4350ea58440d03b7a70a6f1cdbf7f863..af7555d4805384274b57a9cf865b44779740b0b1 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -45,14 +45,14 @@ static struct GNUNET_REGEX_Search *s;
 
 static int ok = 1;
 
-static GNUNET_SCHEDULER_TaskIdentifier die_task;
+static struct GNUNET_SCHEDULER_Task * die_task;
 
 
 static void
 end (void *cls,
      const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  die_task = GNUNET_SCHEDULER_NO_TASK;
+  die_task = NULL;
   GNUNET_REGEX_announce_cancel (a);
   a = NULL;
   GNUNET_REGEX_search_cancel (s);
@@ -64,7 +64,7 @@ end (void *cls,
 static void
 end_badly ()
 {
-  die_task = GNUNET_SCHEDULER_NO_TASK;
+  die_task = NULL;
   FPRINTF (stderr, "%s",  "Testcase failed (timeout).\n");
   GNUNET_REGEX_announce_cancel (a);
   a = NULL;
@@ -84,7 +84,7 @@ end_badly ()
  * @param put_path Path of the put request.
  * @param put_path_length Length of the put_path.
  */
-static void 
+static void
 found_cb (void *cls,
          const struct GNUNET_PeerIdentity *id,
          const struct GNUNET_PeerIdentity *get_path,
@@ -106,7 +106,7 @@ run (void *cls,
   die_task =
     GNUNET_SCHEDULER_add_delayed (TOTAL_TIMEOUT,
                                  &end_badly, NULL);
-  a = GNUNET_REGEX_announce (cfg, 
+  a = GNUNET_REGEX_announce (cfg,
                             "my long prefix - hello world(0|1)*",
                             GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
                                                            5),