Update of /cvsroot/freenet/freenet/src/freenet/client/cli
In directory sc8-pr-cvs1:/tmp/cvs-serv22945/src/freenet/client/cli

Modified Files:
      Tag: ngrouting
        CLIFNPClient.java 
Log Message:
Fix for class initialization order, see Sun BugID 4419673 for a discussion around the 
issue

Index: CLIFNPClient.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/client/cli/CLIFNPClient.java,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -u -r1.3 -r1.3.6.1
--- CLIFNPClient.java   3 Nov 2002 19:14:14 -0000       1.3
+++ CLIFNPClient.java   26 Aug 2003 23:04:35 -0000      1.3.6.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();
         
     }
 }

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to