Author: toad
Date: 2006-07-08 14:04:45 +0000 (Sat, 08 Jul 2006)
New Revision: 9507

Modified:
   trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
   trunk/freenet/src/freenet/node/Version.java
   trunk/freenet/src/freenet/support/TokenBucket.java
Log:
865: Fix serious bug in BlockTransmitter. MANDATORY IMMEDIATELY.

Modified: trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java
===================================================================
--- trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java     2006-07-08 
13:25:20 UTC (rev 9506)
+++ trunk/freenet/src/freenet/io/xfer/BlockTransmitter.java     2006-07-08 
14:04:45 UTC (rev 9507)
@@ -160,6 +160,7 @@

                                if(now > end) return;
                                while(now < end) {
+                                       now = System.currentTimeMillis();
                                        long l = end - now;
                                        int x = (int) (Math.min(l, 
Integer.MAX_VALUE));
                                        if(x > 0)

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-07-08 13:25:20 UTC (rev 
9506)
+++ trunk/freenet/src/freenet/node/Version.java 2006-07-08 14:04:45 UTC (rev 
9507)
@@ -18,12 +18,12 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 864;
+       private static final int buildNumber = 865;

        /** Oldest build of Fred we will talk to */
-       private static final int oldLastGoodBuild = 844;
-       private static final int newLastGoodBuild = 864;
-       private static final long transitionTime = 1152489600000L; // 0:00 GMT 
30/06/06
+       private static final int oldLastGoodBuild = 865;
+       private static final int newLastGoodBuild = 865;
+       private static final long transitionTime = 0L; // 0:00 GMT 30/06/06

        public static final int buildNumber() {
                return buildNumber;

Modified: trunk/freenet/src/freenet/support/TokenBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/TokenBucket.java  2006-07-08 13:25:20 UTC 
(rev 9506)
+++ trunk/freenet/src/freenet/support/TokenBucket.java  2006-07-08 14:04:45 UTC 
(rev 9507)
@@ -65,6 +65,7 @@
        }

        public synchronized void blockingGrab(long tokens) {
+               Logger.minor(this, "Blocking grab: "+tokens);
                if(tokens < max)
                        innerBlockingGrab(tokens);
                else {
@@ -79,7 +80,7 @@
         * @param tokens The number of tokens to grab.
         */
        public synchronized void innerBlockingGrab(long tokens) {
-               Logger.minor(this, "Blocking grab: "+tokens);
+               Logger.minor(this, "Inner blocking grab: "+tokens);
                addTokens();
                if(current > max) current = max;
                Logger.minor(this, "current="+current);


Reply via email to