Author: toad
Date: 2008-11-22 18:36:47 +0000 (Sat, 22 Nov 2008)
New Revision: 23807
Modified:
trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
Log:
Don't go straight to onDecodedSegment, FEC will run in another thread.
Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-11-22 17:22:47 UTC (rev 23806)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-11-22 18:36:47 UTC (rev 23807)
@@ -175,7 +175,6 @@
((ClientGetter)parentFetcher.parent).addKeyToBinaryBlob(block);
// No need to unregister key, because it will be cleared in
tripPendingKey().
boolean dontNotify;
- boolean haveDataBlocks;
boolean wasDataBlock = false;
boolean allFailed = false;
synchronized(this) {
@@ -217,7 +216,7 @@
if(wasDataBlock)
fetchedDataBlocks++;
if(logMINOR) Logger.minor(this, "Fetched
"+fetchedBlocks+" blocks in onSuccess("+blockNo+")");
- haveDataBlocks = fetchedDataBlocks ==
dataKeys.length;
+ boolean haveDataBlocks = fetchedDataBlocks ==
dataKeys.length;
decodeNow = (fetchedBlocks >= minFetched ||
haveDataBlocks);
if(decodeNow) {
startedDecode = true;
@@ -234,10 +233,7 @@
seg.possiblyRemoveFromParent();
if(decodeNow) {
removeSubSegments();
- if(haveDataBlocks)
- onDecodedSegment();
- else
- decode();
+ decode();
} else if(allFailed) {
fail(new FetchException(FetchException.SPLITFILE_ERROR,
errors));
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs