gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18088 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r18088 - gnunet/src/fs
Date: Thu, 10 Nov 2011 09:52:19 +0100

Author: grothoff
Date: 2011-11-10 09:52:19 +0100 (Thu, 10 Nov 2011)
New Revision: 18088

Modified:
   gnunet/src/fs/gnunet-service-fs.c
Log:
fix

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2011-11-10 08:28:21 UTC (rev 18087)
+++ gnunet/src/fs/gnunet-service-fs.c   2011-11-10 08:52:19 UTC (rev 18088)
@@ -97,7 +97,7 @@
  * Running average of the observed latency to other peers (round trip).
  * Initialized to 5s as the initial default.
  */
-struct GNUNET_TIME_Relative GSF_avg_latency = { 5000 };
+struct GNUNET_TIME_Relative GSF_avg_latency = { 500 };
 
 /**
  * Typical priorities we're seeing from other peers right now.  Since
@@ -234,8 +234,9 @@
   {
     if (ntohl (atsi[i].type) == GNUNET_ATS_QUALITY_NET_DELAY)
     {
-      GSF_avg_latency.rel_value =
-          (GSF_avg_latency.rel_value * 31 + ntohl (atsi[i].value)) / 32;
+      GSF_avg_latency.rel_value = (GSF_avg_latency.rel_value * 31 + 
+                                  GNUNET_MIN (5000,
+                                              ntohl (atsi[i].value))) / 32;
       GNUNET_STATISTICS_set (GSF_stats,
                              gettext_noop
                              ("# running average P2P latency (ms)"),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]