Update of /cvsroot/freenet/freenet/src/freenet/config
In directory sc8-pr-cvs1:/tmp/cvs-serv25857/src/freenet/config
Modified Files:
Tag: stable
Config.java Option.java RandomPortOption.java Setup.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: Config.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/config/Config.java,v
retrieving revision 1.5.4.2.2.1
retrieving revision 1.5.4.2.2.2
diff -u -w -r1.5.4.2.2.1 -r1.5.4.2.2.2
--- Config.java 1 Apr 2003 21:04:16 -0000 1.5.4.2.2.1
+++ Config.java 28 Oct 2003 20:20:29 -0000 1.5.4.2.2.2
@@ -1,3 +1,4 @@
+/* -*- Mode: java; c-basic-indent: 4; tab-width: 4 -*- */
package freenet.config;
import freenet.support.Comparable;
@@ -204,6 +205,10 @@
optArray[i] = (Option) opts.nextElement();
return optArray;
}
+
+ public Option getOption(String name){
+ return (Option)options.get(name);
+ }
public void printUsage(PrintStream out) {
Index: Option.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/config/Option.java,v
retrieving revision 1.2.4.1.2.2
retrieving revision 1.2.4.1.2.3
diff -u -w -r1.2.4.1.2.2 -r1.2.4.1.2.3
--- Option.java 15 Jul 2003 14:29:39 -0000 1.2.4.1.2.2
+++ Option.java 28 Oct 2003 20:20:29 -0000 1.2.4.1.2.3
@@ -31,6 +31,13 @@
public final String name() {
return name;
}
+
+ public String getShortDesc(){
+ return shortDesc;
+ }
+ public String[] getLongDesc(){
+ return longDesc;
+ }
public final char abbrev() {
return abbrev;
Index: RandomPortOption.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/config/RandomPortOption.java,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -u -w -r1.1 -r1.1.6.1
--- RandomPortOption.java 7 Jul 2002 22:08:22 -0000 1.1
+++ RandomPortOption.java 28 Oct 2003 20:20:30 -0000 1.1.6.1
@@ -31,7 +31,7 @@
boolean worked = false;
int i = 0;
do {
- port = 5001 + Math.abs(Core.randSource.nextInt()) % (65536 - 5001);
+ port = 5001 + Math.abs(Core.getRandSource().nextInt()) % (65536 - 5001);
try {
ServerSocket ss = new ServerSocket(port);
worked = true;
Index: Setup.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/config/Setup.java,v
retrieving revision 1.4.4.1.2.3
retrieving revision 1.4.4.1.2.4
diff -u -w -r1.4.4.1.2.3 -r1.4.4.1.2.4
--- Setup.java 2 Aug 2003 15:01:31 -0000 1.4.4.1.2.3
+++ Setup.java 28 Oct 2003 20:20:30 -0000 1.4.4.1.2.4
@@ -34,7 +34,7 @@
public static void main(String[] args) {
Params switches = new Params(options.getOptions());
- Params params = new Params(Node.config.getOptions());
+ Params params = new Params(Node.getConfig().getOptions());
switches.readArgs(args);
ReadInputStream in = new ReadInputStream(System.in);
boolean expert = switches.getParam("expert") != null;
@@ -48,7 +48,7 @@
System.out.println("Options:");
options.printUsage(System.out);
System.out.println("Settings: ");
- Node.config.printUsage(System.out);
+ Node.getConfig().printUsage(System.out);
System.exit(1);
} else
filename = switches.getArg(0);
@@ -67,10 +67,10 @@
Setup setup;
if (silent)
setup = new Setup(System.out, new File(filename), params,
- Node.config.getOptions());
+ Node.getConfig().getOptions());
else
setup = new Setup(in, System.out, new File(filename), expert,
- params, Node.config.getOptions());
+ params, Node.getConfig().getOptions());
try {
if (switches.getParam("update") == null)
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs