Author: toad
Date: 2008-11-21 19:35:04 +0000 (Fri, 21 Nov 2008)
New Revision: 23789
Modified:
trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
Log:
Skip the actual decode.
Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-11-21 19:22:33 UTC (rev 23788)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-11-21 19:35:04 UTC (rev 23789)
@@ -174,6 +174,7 @@
((ClientGetter)parentFetcher.parent).addKeyToBinaryBlob(block);
// No need to unregister key, because it will be cleared in
tripPendingKey().
boolean dontNotify;
+ boolean haveDataBlocks;
synchronized(this) {
if(blockNo < dataKeys.length) {
if(dataKeys[blockNo] == null) {
@@ -207,7 +208,8 @@
if(blockNo < dataKeys.length)
fetchedDataBlocks++;
if(logMINOR) Logger.minor(this, "Fetched
"+fetchedBlocks+" blocks in onSuccess("+blockNo+")");
- decodeNow = (fetchedBlocks >= minFetched ||
fetchedDataBlocks == dataKeys.length);
+ haveDataBlocks = fetchedDataBlocks ==
dataKeys.length;
+ decodeNow = (fetchedBlocks >= minFetched ||
haveDataBlocks);
if(decodeNow) {
startedDecode = true;
finishing = true;
@@ -219,7 +221,10 @@
seg.possiblyRemoveFromParent();
if(decodeNow) {
removeSubSegments();
- decode();
+ if(haveDataBlocks)
+ onDecodedSegment();
+ else
+ decode();
}
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs