-fixing #3034
[oweals/gnunet.git] / src / fs / gnunet-service-fs.c
index 9074f053edc8677cb40ee9a77f2e2d46b7c6818d..8ecb6bb6784dc3b115c8b1afce628936517892c4 100644 (file)
@@ -202,7 +202,7 @@ GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start)
   struct GNUNET_TIME_Relative delay;
 
   delay = GNUNET_TIME_absolute_get_duration (start);
-  GNUNET_LOAD_update (datastore_get_load, delay.rel_value);
+  GNUNET_LOAD_update (datastore_get_load, delay.rel_value_us);
 }
 
 
@@ -260,16 +260,16 @@ update_latencies (void *cls,
   {
     if (GNUNET_ATS_QUALITY_NET_DELAY != ntohl (ats[i].type))
       continue;
-    latency.rel_value = ntohl (ats[i].value);
+    latency.rel_value_us = ntohl (ats[i].value);
     GSF_update_peer_latency_ (&address->peer,
                              latency);
-    GSF_avg_latency.rel_value =
-      (GSF_avg_latency.rel_value * 31 +
+    GSF_avg_latency.rel_value_us =
+      (GSF_avg_latency.rel_value_us * 31 +
        GNUNET_MIN (5000, ntohl (ats[i].value))) / 32;
     GNUNET_STATISTICS_set (GSF_stats,
                           gettext_noop
                           ("# running average P2P latency (ms)"),
-                          GSF_avg_latency.rel_value, GNUNET_NO);
+                          GSF_avg_latency.rel_value_us / 1000LL, GNUNET_NO);
     break;    
   }
 }
@@ -573,11 +573,10 @@ peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
  * directly (which should work if you are authorized...).
  *
  * @param cls closure
- * @param server handle to the server, NULL if we failed
  * @param my_identity ID of this peer, NULL if we failed
  */
 static void
-peer_init_handler (void *cls, struct GNUNET_CORE_Handle *server,
+peer_init_handler (void *cls,
                    const struct GNUNET_PeerIdentity *my_identity)
 {
   my_id = *my_identity;