Author: toad
Date: 2007-05-26 01:01:41 +0000 (Sat, 26 May 2007)
New Revision: 13380
Modified:
trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java
trunk/freenet/src/freenet/node/SimpleSendableInsert.java
Log:
Binary blob insertions working.
Still some more work to do on creation of binary blobs: Currently we don't
include the decoded or encoded blocks, we only include the ones we have
downloaded.
Modified: trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java
2007-05-25 23:51:55 UTC (rev 13379)
+++ trunk/freenet/src/freenet/client/async/BinaryBlobInserter.java
2007-05-26 01:01:41 UTC (rev 13380)
@@ -238,7 +238,7 @@
maybeFinish();
}
- boolean shouldCache() {
+ public boolean shouldCache() {
return ctx.cacheLocalRequests;
}
}
Modified: trunk/freenet/src/freenet/node/SimpleSendableInsert.java
===================================================================
--- trunk/freenet/src/freenet/node/SimpleSendableInsert.java 2007-05-25
23:51:55 UTC (rev 13379)
+++ trunk/freenet/src/freenet/node/SimpleSendableInsert.java 2007-05-26
01:01:41 UTC (rev 13380)
@@ -67,7 +67,7 @@
boolean logMINOR = Logger.shouldLog(Logger.MINOR, this);
try {
if(logMINOR) Logger.minor(this, "Starting request:
"+this);
- core.realPut(block, false);
+ core.realPut(block, shouldCache());
} catch (LowLevelPutException e) {
onFailure(e);
if(logMINOR) Logger.minor(this, "Request failed:
"+this+" for "+e);
@@ -110,7 +110,7 @@
if(arr != null) arr.remove(this);
}
- boolean shouldCache() {
+ public boolean shouldCache() {
// This is only used as-is by the random reinsert from a
request code. Subclasses should override!
return false;
}