Update of /cvsroot/freenet/freenet/src/freenet/client/cli
In directory sc8-pr-cvs1:/tmp/cvs-serv25857/src/freenet/client/cli
Modified Files:
Tag: stable
CLIFNPClient.java PutCommand.java
Log Message:
5029: Merge from unstable after months of work. MASSIVE changes.
Highlights:
* Next Generation Routing, massive related changes
* Major changes to handling of messages and connections (PeerHandler and related
changes)
* Even more non-blocking I/O
* Documentation improvements
* Lots of new diagnostics and config options
* Lots of bug fixes and performance tweaking
* Probably lots of new bugs too!
Index: CLIFNPClient.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/client/cli/CLIFNPClient.java,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.1.2.1
diff -u -w -r1.2.4.1 -r1.2.4.1.2.1
--- CLIFNPClient.java 4 Nov 2002 18:46:26 -0000 1.2.4.1
+++ CLIFNPClient.java 28 Oct 2003 20:20:25 -0000 1.2.4.1.2.1
@@ -38,7 +38,7 @@
private static ClientCore getTCPCore(Params options, Logger log)
throws CLIException {
- options.addOptions(Core.config.getOptions());
+ options.addOptions(Core.getConfig().getOptions());
options.put("transient","yes"); // clients are transient
String address = options.getString("myAddress");
try {
@@ -62,21 +62,21 @@
static {
try {
- Core.config.addOption("myAddress", 1,
InetAddress.getLocalHost().getHostName() + ":1177", 150); // FIXME
+ Core.getConfig().addOption("myAddress", 1,
InetAddress.getLocalHost().getHostName() + ":1177", 150); // FIXME
} catch (UnknownHostException e) {
- Core.config.addOption("myAddress", 1, "localhost", 155);
+ Core.getConfig().addOption("myAddress", 1, "localhost", 155);
}
- Core.config.argDesc("myAddress","<hostname>");
- Core.config.shortDesc("myAddress","Set the clients own address.");
- Core.config.longDesc("myAddress",
+ Core.getConfig().argDesc("myAddress","<hostname>");
+ Core.getConfig().shortDesc("myAddress","Set the clients own address.");
+ Core.getConfig().longDesc("myAddress",
"FNP requires that nodes be able to connect back to you.
Setting",
"the right address can sometimes be a problem, this
causes it to be forced.");
- Core.config.addOption("serverRef", 'r', 1, "target.ref", 160);
- Core.config.argDesc("serverRef","<filename>");
- Core.config.shortDesc("serverRef","A .ref file for the node to talk to.");
- Core.config.longDesc("serverRef",
+ Core.getConfig().addOption("serverRef", 'r', 1, "target.ref", 160);
+ Core.getConfig().argDesc("serverRef","<filename>");
+ Core.getConfig().shortDesc("serverRef","A .ref file for the node to talk
to.");
+ Core.getConfig().longDesc("serverRef",
"The name of file containing the address to the freenet
node",
"to connect to when making requests. The file should be
in Freenet .ref",
"format.");
@@ -125,7 +125,7 @@
}
public Config getOptions() {
- return Core.config;
+ return Core.getConfig();
}
}
Index: PutCommand.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/client/cli/PutCommand.java,v
retrieving revision 1.4.4.4.2.1
retrieving revision 1.4.4.4.2.2
diff -u -w -r1.4.4.4.2.1 -r1.4.4.4.2.2
--- PutCommand.java 4 Apr 2003 22:57:57 -0000 1.4.4.4.2.1
+++ PutCommand.java 28 Oct 2003 20:20:25 -0000 1.4.4.4.2.2
@@ -74,7 +74,7 @@
uri = new FreenetURI(p.getArg(1));
if (mdata != null) {
metadata = new Metadata(mdata.getInputStream(), ms);
-// System.err.println("Creating new metadata");
+// System.err.println("Creating new metadata: \n"+metadata);
if(metadata.getSettings() == null)
throw new NullPointerException("wtf?");
}
@@ -89,9 +89,9 @@
e);
}
//System.err.println("LALA: " + metadata);
+ boolean noredirect = p.getParam("noredirect") != null;
if (!uri.getKeyType().equals("CHK") &&
- p.getParam("noredirect") == null) {
-
+ !noredirect) {
try {
DocumentCommand redirect;
if(metadata == null)
@@ -140,7 +140,6 @@
if (p.getParam("dontGuessType") == null) {
String type = MimeTypeUtils.getExtType(data.getName());
- //System.err.println("CONTENT TYPE: " + type);
try {
if (type != null) {
if (metadata == null)
@@ -159,7 +158,6 @@
}
}
-
// Temp File settings.
String tempDir = p.getParam("tempDir");
if (tempDir == null) {
@@ -179,7 +177,7 @@
return new PutRequestProcess(uri, htl, p.getString("cipher"),
metadata, ms,
data, new TempBucketFactory(tempDir),
- 0, true, skipDS);
+ 0, !noredirect, skipDS);
}
public boolean takesData() {
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs