gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1388 - GNUnet/src/util


From: grothoff
Subject: [GNUnet-SVN] r1388 - GNUnet/src/util
Date: Mon, 11 Jul 2005 05:49:20 -0700 (PDT)

Author: grothoff
Date: 2005-07-11 05:49:17 -0700 (Mon, 11 Jul 2005)
New Revision: 1388

Modified:
   GNUnet/src/util/statuscalls.c
Log:
oops

Modified: GNUnet/src/util/statuscalls.c
===================================================================
--- GNUnet/src/util/statuscalls.c       2005-07-11 12:40:21 UTC (rev 1387)
+++ GNUnet/src/util/statuscalls.c       2005-07-11 12:49:17 UTC (rev 1388)
@@ -685,7 +685,7 @@
     MUTEX_UNLOCK(&statusMutex);
     return -1;
   }
-  if (lastCall - now < cronSECONDS) {
+  if (now - lastCall < cronSECONDS) {
     /* increase last load proportional to difference in
        data transmitted and in relation to the limit */
     ret = lastValue + 100 * (currentLoadSum - lastSum) / maxNetDownBPS;
@@ -694,7 +694,7 @@
   }
      
   currentLoadSum += overload;
-  maxExpect = ( (lastCall - now) * maxNetDownBPS ) / cronSECONDS;
+  maxExpect = ( (now - lastCall) * maxNetDownBPS ) / cronSECONDS;
   lastCall = now;
   if (currentLoadSum < maxExpect) 
     overload = 0;
@@ -742,7 +742,7 @@
     MUTEX_UNLOCK(&statusMutex);
     return -1;
   }
-  if (lastCall - now < cronSECONDS) {
+  if (now - lastCall < cronSECONDS) {
     /* increase last load proportional to difference in
        data transmitted and in relation to the limit */
     ret = lastValue + 100 * (currentLoadSum - lastSum) / maxNetDownBPS;
@@ -750,7 +750,7 @@
     return ret;
   }
   currentLoadSum += overload;
-  maxExpect = ( (lastCall - now) * maxNetDownBPS ) / cronSECONDS;
+  maxExpect = ( (now - lastCall) * maxNetDownBPS ) / cronSECONDS;
   lastCall = now;
   if (currentLoadSum < maxExpect) 
     overload = 0;





reply via email to

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