-fix off-by-1
[oweals/gnunet.git] / src / statistics / gnunet-service-statistics.c
index 0126f149b49036a17d68f6d585f04746b3a6ea17..8d989dafbeed061a25b51fffee74562499ffd521 100644 (file)
@@ -321,7 +321,7 @@ load (struct GNUNET_SERVER_Handle *server)
   }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               _("Loading %llu bytes of statistics from `%s'\n"),
-              fsize, fn);
+              (unsigned long long) fsize, fn);
   mst = GNUNET_SERVER_mst_create (&inject_message,
                                   server);
   GNUNET_break (GNUNET_OK ==
@@ -475,7 +475,7 @@ transmit (struct GNUNET_SERVER_Client *client,
               e->subsystem->service,
               e->name,
               e->persistent,
-              e->value);
+              (unsigned long long) e->value);
   GNUNET_SERVER_notification_context_unicast (nc, client, &m->header,
                                               GNUNET_NO);
   GNUNET_free (m);
@@ -793,7 +793,7 @@ handle_set (void *cls,
                 "Statistic `%s:%s' updated to value %llu (%d).\n",
                 service,
                 name,
-                pos->value,
+                (unsigned long long) pos->value,
                 pos->persistent);
     if ( (changed) ||
          (1 == initial_set) )
@@ -829,7 +829,7 @@ handle_set (void *cls,
               "New statistic on `%s:%s' with value %llu created.\n",
               service,
               name,
-              pos->value);
+              (unsigned long long) pos->value);
   GNUNET_SERVER_receive_done (client,
                               GNUNET_OK);
 }
@@ -907,7 +907,7 @@ handle_watch (void *cls,
                 "New statistic on `%s:%s' with value %llu created.\n",
                 service,
                 name,
-                pos->value);
+                (unsigned long long) pos->value);
   }
   we = GNUNET_new (struct WatchEntry);
   we->client = client;
@@ -1053,9 +1053,8 @@ run (void *cls,
                                    &handle_client_disconnect,
                                    NULL);
   load (server);
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                                &shutdown_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+                                NULL);
 }