-rps: open channel when inserting peer in view
[oweals/gnunet.git] / src / secretsharing / test_secretsharing_api.c
index 97db8d46826a70f6fdfc3e996e7f84e517e70f5c..341a33b847b8d0289c15254430ffbb589a9422ff 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2014 Christian Grothoff (and other contributing authors)
+     Copyright (C) 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
@@ -47,9 +47,9 @@ static void secret_ready_cb (void *cls,
   GNUNET_SCHEDULER_shutdown ();
 }
 
+
 static void
-handle_shutdown (void *cls,
-                 const struct GNUNET_SCHEDULER_TaskContext * tc)
+handle_shutdown (void *cls)
 {
   if (NULL != keygen)
   {
@@ -58,17 +58,17 @@ handle_shutdown (void *cls,
   }
 }
 
+
 static void
 run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg,
      struct GNUNET_TESTING_Peer *peer)
 {
-  struct GNUNET_HashCode session_id; 
+  struct GNUNET_HashCode session_id;
   struct GNUNET_TIME_Absolute start;
   struct GNUNET_TIME_Absolute deadline;
 
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                                handle_shutdown, NULL);
+  GNUNET_SCHEDULER_add_shutdown (&handle_shutdown, NULL);
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "testing secretsharing api\n");
 
@@ -100,4 +100,3 @@ main (int argc, char **argv)
     return ret;
   return (GNUNET_YES == success) ? 0 : 1;
 }
-