Author: toad
Date: 2006-02-11 18:19:16 +0000 (Sat, 11 Feb 2006)
New Revision: 8014
Modified:
trunk/freenet/src/freenet/client/async/ClientPutter.java
trunk/freenet/src/freenet/node/Version.java
trunk/freenet/src/freenet/node/fcp/ClientGetMessage.java
trunk/freenet/src/freenet/node/fcp/ClientPut.java
trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java
Log:
442:
Boolean.getBoolean -> Boolean.parseBoolean (DUH!)
Fixes:
- FCP DontCompress option not working (tested)
- FCP ClientGet IgnoreDS option not working (not tested)
- FCP ClientGet DSOnly option not working (not tested)
- FCP ClientPut GetCHKOnly option not working (tested)
Modified: trunk/freenet/src/freenet/client/async/ClientPutter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientPutter.java 2006-02-11
17:28:31 UTC (rev 8013)
+++ trunk/freenet/src/freenet/client/async/ClientPutter.java 2006-02-11
18:19:16 UTC (rev 8014)
@@ -24,6 +24,18 @@
private final boolean isMetadata;
private FreenetURI uri;
+ /**
+ * @param client The object to call back when we complete, or don't.
+ * @param data
+ * @param targetURI
+ * @param cm
+ * @param ctx
+ * @param scheduler
+ * @param priorityClass
+ * @param getCHKOnly
+ * @param isMetadata
+ * @param clientContext The client object for purposs of round-robin
client balancing.
+ */
public ClientPutter(ClientCallback client, Bucket data, FreenetURI
targetURI, ClientMetadata cm, InserterContext ctx,
ClientRequestScheduler scheduler, short priorityClass,
boolean getCHKOnly, boolean isMetadata, Object clientContext) {
super(priorityClass, scheduler, clientContext);
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-02-11 17:28:31 UTC (rev
8013)
+++ trunk/freenet/src/freenet/node/Version.java 2006-02-11 18:19:16 UTC (rev
8014)
@@ -20,7 +20,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 441;
+ private static final int buildNumber = 442;
/** Oldest build of Fred we will talk to */
private static final int lastGoodBuild = 403;
Modified: trunk/freenet/src/freenet/node/fcp/ClientGetMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientGetMessage.java 2006-02-11
17:28:31 UTC (rev 8013)
+++ trunk/freenet/src/freenet/node/fcp/ClientGetMessage.java 2006-02-11
18:19:16 UTC (rev 8014)
@@ -51,8 +51,8 @@
public ClientGetMessage(SimpleFieldSet fs) throws
MessageInvalidException {
short defaultPriority;
- ignoreDS = Boolean.getBoolean(fs.get("IgnoreDS"));
- dsOnly = Boolean.getBoolean(fs.get("DSOnly"));
+ ignoreDS = Boolean.parseBoolean(fs.get("IgnoreDS"));
+ dsOnly = Boolean.parseBoolean(fs.get("DSOnly"));
identifier = fs.get("Identifier");
if(identifier == null)
throw new
MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "No Identifier",
null);
Modified: trunk/freenet/src/freenet/node/fcp/ClientPut.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientPut.java 2006-02-11 17:28:31 UTC
(rev 8013)
+++ trunk/freenet/src/freenet/node/fcp/ClientPut.java 2006-02-11 18:19:16 UTC
(rev 8014)
@@ -17,6 +17,7 @@
import freenet.client.events.SplitfileProgressEvent;
import freenet.client.events.StartedCompressionEvent;
import freenet.keys.FreenetURI;
+import freenet.support.Logger;
public class ClientPut extends ClientRequest implements ClientCallback,
ClientEventListener {
@@ -50,7 +51,7 @@
uri = message.uri;
String mimeType = message.contentType;
block = new InsertBlock(message.bucket, new
ClientMetadata(mimeType), uri);
- inserter = new ClientPutter(this, message.bucket, uri, new
ClientMetadata(mimeType), ctx, handler.node.putScheduler, priorityClass,
getCHKOnly, false, handler.defaultInsertContext);
+ inserter = new ClientPutter(this, message.bucket, uri, new
ClientMetadata(mimeType), ctx, handler.node.putScheduler, priorityClass,
getCHKOnly, false, handler);
}
void start() {
Modified: trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java 2006-02-11
17:28:31 UTC (rev 8013)
+++ trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java 2006-02-11
18:19:16 UTC (rev 8014)
@@ -6,6 +6,7 @@
import freenet.keys.FreenetURI;
import freenet.node.Node;
import freenet.node.RequestStarter;
+import freenet.support.Logger;
import freenet.support.SimpleFieldSet;
import freenet.support.io.FileBucket;
@@ -77,7 +78,7 @@
throw new
MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error
parsing MaxSize field: "+e.getMessage(), identifier);
}
}
- getCHKOnly = Boolean.getBoolean(fs.get("GetCHKOnly"));
+ getCHKOnly = Boolean.parseBoolean(fs.get("GetCHKOnly"));
String priorityString = fs.get("PriorityClass");
if(priorityString == null) {
// defaults to the one just below fproxy
@@ -114,7 +115,7 @@
throw new
MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error
parsing DataLength field: "+e.getMessage(), identifier);
}
}
- dontCompress = Boolean.getBoolean(fs.get("DontCompress"));
+ dontCompress = Boolean.parseBoolean(fs.get("DontCompress"));
}
public SimpleFieldSet getFieldSet() {