log error when timed out
[oweals/gnunet.git] / src / set / gnunet-set-profiler.c
index 11b921bf0fb8b7191011c90fd8f83415acf9d917..6d97f0bb1f091fa90e663998303ea73275a41504 100644 (file)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      Copyright (C) 2013 Christian Grothoff (and other contributing authors)
+      Copyright (C) 2013 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
@@ -192,7 +192,10 @@ set_result_cb (void *cls,
 
   if (element->size != sizeof (struct GNUNET_HashCode))
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_INFO, "wrong element size: %u, expected %u\n", element->size, sizeof (struct GNUNET_HashCode));
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "wrong element size: %u, expected %u\n",
+                element->size,
+                (unsigned int) sizeof (struct GNUNET_HashCode));
     GNUNET_assert (0);
   }
 
@@ -247,8 +250,7 @@ set_insert_iterator (void *cls,
 
 
 static void
-handle_shutdown (void *cls,
-                 const struct GNUNET_SCHEDULER_TaskContext *tc)
+handle_shutdown (void *cls)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Shutting down set profiler\n");
@@ -300,7 +302,7 @@ run (void *cls,
 
   statistics = GNUNET_STATISTICS_create ("set-profiler", cfg);
 
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, handle_shutdown, NULL);
+  GNUNET_SCHEDULER_add_shutdown (&handle_shutdown, NULL);
 
   info1.id = "a";
   info2.id = "b";
@@ -393,4 +395,3 @@ main (int argc, char **argv)
                      options, &pre_run, NULL, GNUNET_YES);
   return ret;
 }
-