Author: toad
Date: 2008-07-19 22:46:46 +0000 (Sat, 19 Jul 2008)
New Revision: 21277
Modified:
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
Log:
Deactivation/setting
Modified: branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
2008-07-19 22:17:25 UTC (rev 21276)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileFetcher.java
2008-07-19 22:46:46 UTC (rev 21277)
@@ -157,6 +157,10 @@
System.arraycopy(splitfileCheckBlocks, 0,
newSplitfileCheckBlocks, 0, splitfileCheckBlocks.length);
segments[0] = new
SplitFileFetcherSegment(splitfileType, newSplitfileDataBlocks,
newSplitfileCheckBlocks,
this, archiveContext, fetchContext,
maxTempLength, recursionLevel, parent);
+ if(persistent) {
+ container.set(segments[0]);
+ container.deactivate(segments[0], 1);
+ }
} else {
int dataBlocksPtr = 0;
int checkBlocksPtr = 0;
@@ -174,6 +178,10 @@
checkBlocksPtr += copyCheckBlocks;
segments[i] = new
SplitFileFetcherSegment(splitfileType, dataBlocks, checkBlocks, this,
archiveContext,
fetchContext, maxTempLength,
recursionLevel+1, parent);
+ if(persistent) {
+ container.set(segments[i]);
+ container.deactivate(segments[i], 1);
+ }
}
if(dataBlocksPtr != splitfileDataBlocks.length)
throw new
FetchException(FetchException.INVALID_METADATA, "Unable to allocate all data
blocks to segments - buggy or malicious inserter");