removing fprintfs -- with bad %fmt statements giving warnings
[oweals/gnunet.git] / src / peerinfo / gnunet-service-peerinfo.c
index 2a84547393cc945a180edda3a7fd3b7b08ed9ea3..31b0199f466965a4bcd341889632b5e02e7e3753 100644 (file)
@@ -130,7 +130,7 @@ discard_expired (void *cls,
                  const void *addr, uint16_t addrlen)
 {
   const struct GNUNET_TIME_Absolute *now = cls;
-  if (now->value > expiration.value)
+  if (now->abs_value > expiration.abs_value)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                  _("Removing expired address of transport `%s'\n"),
@@ -311,8 +311,7 @@ cron_scan_directory_data_hosts (void *cls,
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING |
                 GNUNET_ERROR_TYPE_BULK,
                 _("Still no peers found in `%s'!\n"), networkIdDirectory);
-  GNUNET_SCHEDULER_add_delayed (tc->sched,
-                                DATA_HOST_FREQ,
+  GNUNET_SCHEDULER_add_delayed (DATA_HOST_FREQ,
                                 &cron_scan_directory_data_hosts, NULL);
 }
 
@@ -347,7 +346,7 @@ bind_address (const struct GNUNET_PeerIdentity *peer,
       delta = GNUNET_HELLO_equals (mrg,
                                   host->hello,
                                   GNUNET_TIME_absolute_get ());
-      if (delta.value == GNUNET_TIME_UNIT_FOREVER_ABS.value)
+      if (delta.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
        {
          GNUNET_free (mrg);
          return;
@@ -464,8 +463,7 @@ cron_clean_data_hosts (void *cls,
   now = GNUNET_TIME_absolute_get ();
   GNUNET_DISK_directory_scan (networkIdDirectory,
                               &discard_hosts_helper, &now);
-  GNUNET_SCHEDULER_add_delayed (tc->sched,
-                                DATA_HOST_CLEAN_FREQ,
+  GNUNET_SCHEDULER_add_delayed (DATA_HOST_CLEAN_FREQ,
                                 &cron_clean_data_hosts, NULL);
 }
 
@@ -519,6 +517,7 @@ handle_get (void *cls,
   struct GNUNET_SERVER_TransmitContext *tc;
 
   lpm = (const struct ListPeerMessage *) message;
+  GNUNET_break (0 == ntohl (lpm->reserved));
 #if DEBUG_PEERINFO
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "`%s' message received for peer `%4s'\n",
@@ -649,13 +648,11 @@ shutdown_task (void *cls,
  * Process statistics requests.
  *
  * @param cls closure
- * @param sched scheduler to use
  * @param server the initialized server
  * @param cfg configuration to use
  */
 static void
 run (void *cls,
-     struct GNUNET_SCHEDULER_Handle *sched,
      struct GNUNET_SERVER_Handle *server,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
@@ -671,7 +668,7 @@ run (void *cls,
   };
 
   hostmap = GNUNET_CONTAINER_multihashmap_create (1024);
-  stats = GNUNET_STATISTICS_create (sched, "peerinfo", cfg);
+  stats = GNUNET_STATISTICS_create ("peerinfo", cfg);
   notify_list = GNUNET_SERVER_notification_context_create (server, 0);
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONFIGURATION_get_value_filename (cfg,
@@ -679,14 +676,11 @@ run (void *cls,
                                                           "HOSTS",
                                                           &networkIdDirectory));
   GNUNET_DISK_directory_create (networkIdDirectory);
-  GNUNET_SCHEDULER_add_with_priority (sched,
-                                     GNUNET_SCHEDULER_PRIORITY_IDLE,
+  GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
                                      &cron_scan_directory_data_hosts, NULL);
-  GNUNET_SCHEDULER_add_with_priority (sched,
-                                     GNUNET_SCHEDULER_PRIORITY_IDLE,
+  GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
                                      &cron_clean_data_hosts, NULL);
-  GNUNET_SCHEDULER_add_delayed (sched,
-                               GNUNET_TIME_UNIT_FOREVER_REL,
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
                                &shutdown_task, NULL);
   GNUNET_SERVER_add_handlers (server, handlers);
 }