gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2353 - GNUnet/src/server


From: grothoff
Subject: [GNUnet-SVN] r2353 - GNUnet/src/server
Date: Mon, 19 Dec 2005 11:59:53 -0800 (PST)

Author: grothoff
Date: 2005-12-19 11:59:52 -0800 (Mon, 19 Dec 2005)
New Revision: 2353

Modified:
   GNUnet/src/server/connection.c
Log:
weak

Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c      2005-12-19 19:58:41 UTC (rev 2352)
+++ GNUnet/src/server/connection.c      2005-12-19 19:59:52 UTC (rev 2353)
@@ -947,7 +947,7 @@
     if((totalMessageSize == sizeof(P2P_PACKET_HEADER)) ||
        (((*priority) < EXTREME_PRIORITY) &&
         ((totalMessageSize / sizeof(P2P_PACKET_HEADER)) < 4) &&
-        (randomi(16) != 0))) {
+        (weak_randomi(16) != 0))) {
       /* randomization necessary to ensure we eventually send
          a small message if there is nothing else to do! */
       return 0;
@@ -962,7 +962,7 @@
       approxProb = 100 - approxProb;  /* now value between 0 and 50 */
       approxProb *= 2;          /* now value between 0 [always approx] and 100 
[never approx] */
       /* control CPU load probabilistically! */
-      if(randomi(1 + approxProb) == 0) {
+      if(weak_randomi(1 + approxProb) == 0) {
         (*priority) = approximateKnapsack(be,
                                           be->session.mtu -
                                           sizeof(P2P_PACKET_HEADER));
@@ -2146,7 +2146,7 @@
      good since it creates opportunities. */
   if (activePeerCount > 0)
     for (u=0;u<minCon;u++)
-      entries[randomi(activePeerCount)]->idealized_limit
+      entries[weak_randomi(activePeerCount)]->idealized_limit
        += MIN_BPM_PER_PEER;
 
   /* prepare for next round */





reply via email to

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