Author: toad
Date: 2008-02-18 23:44:25 +0000 (Mon, 18 Feb 2008)
New Revision: 18059

Modified:
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Another splitfile backdoor coalescing fix: Don't return, continue. (Bug: we 
wouldn't use the key from onGotKey() if there were successful blocks prior to 
it in our block numbers list!).

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2008-02-18 23:40:45 UTC (rev 18058)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2008-02-18 23:44:25 UTC (rev 18059)
@@ -303,6 +303,7 @@
        }

        public void onGotKey(Key key, KeyBlock block, RequestScheduler sched) {
+               if(logMINOR) Logger.minor(this, "onGotKey("+key+")");
                int blockNum = -1;
                Object token = null;
                ClientKey ckey = null;
@@ -311,7 +312,7 @@
                                token = blockNums.get(i);
                                int num = ((Integer)token).intValue();
                                ckey = segment.getBlockKey(num);
-                               if(ckey == null) return; // Already got this key
+                               if(ckey == null) continue; // Already got this 
key
                                Key k = ckey.getNodeKey();
                                if(k.equals(key)) {
                                        blockNum = num;


Reply via email to