Author: toad
Date: 2008-08-29 22:52:58 +0000 (Fri, 29 Aug 2008)
New Revision: 22228
Modified:
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
Log:
Don't activate buckets post-FEC. They will already be activated by the FECCodec
prior to execution.
This seems to have caused the contents produced by the execution to get
clobbered by the activation.
Modified:
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-08-29 22:47:30 UTC (rev 22227)
+++ branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
2008-08-29 22:52:58 UTC (rev 22228)
@@ -356,7 +356,7 @@
if(persistent) {
for(int i=0;i<dataBuckets.length;i++) {
// The FECCodec won't set them.
- container.activate(dataBuckets[i], 5);
+ // But they should be active.
container.set(dataBuckets[i]);
}
}
@@ -466,8 +466,8 @@
}
for(int i=0;i<checkBuckets.length;i++) {
boolean heal = false;
- if(persistent)
- container.activate(checkBuckets[i], 1);
+ // Check buckets will already be active because
the FEC codec
+ // has been using them.
Bucket data = checkBuckets[i].getData();
if(data == null) {
Logger.error(this, "Check block "+i+"
is null on "+this);