Update of /cvsroot/freenet/freenet/src/freenet/node
In directory sc8-pr-cvs1:/tmp/cvs-serv32518/src/freenet/node

Modified Files:
        ConnectionOpener.java Main.java Node.java 
        NodeConfigUpdater.java StateChain.java 
Log Message:
6163: Merge NGRouting
* Routing table switch: new config option routingTableImpl - "classic" or "ng"
* New diagnostics variables: normalizedSuccessTime, successSearchTime, 
successTransferRate, requestSuccessRatio, requestFailureRoutingOrNotRatio, 
routingSuccessRatio. These are reported by both RT modes, so should be usable for 
comparative purposes.
* Significant changes to Node Status Servlet, including a page with several graphs for 
each node in the RT.
* Significant changes to ConnectionOpener. Fixes to races that were causing 
RouteNotFound errors, a toString(), much more and better logging.
* Make a distinction between failed caching a DataReply due to IOE in the store and 
due to IOE on the stream when caching a DataReply. Use this in the code to make sure 
we respond correctly w.r.t. routing (it's more important in NGRouting).
* RoutingTable.route() now takes extra params: HTL, size, whether it is an insert. 
Added reportConnectionSuccess, reportConnectionFailure, used by ConnectionOpener to 
tell RT about connections.
* Major changes to the existing ResponseTimeEstimator class. Changed logic, changed 
serialization, changed interface, just about everything. Now implements the generic 
TimeEstimator, knows about time versus transfer rate versus probability, wraps around 
properly, has some significant algorithm changes.
* Change Routing interface significantly. Several new me methods, old ones have been 
given new arguments. Caller must for stats eventually call terminate(), or another 
terminal method (transferSuccess, dataNotFound). New base class, TerminatableRouting 
(implements Routing, base of NGRouting and TreeRouting), handles most of the stats.
* Add code all over states/ (mostly request, but also the others) for notifying the 
Routing of timings and status, terminating the Routing, some reporting bugfixes, get 
rid of the old "NGROUTING" debug log diagnostics.
* Lots of completely new code for NGRouting, mostly in freenet/node/rt/



Misc fixes etc
* Fix a deadlock in ConnectionHandler
* Iakin fix for 1.4.2 and later changed static initialization behaviour w.r.t. 
Core.params.
* Added messageSuccessRatio, tracks proportion of messages successfully sent
* Fix some NullPointerExceptions
* Spelling fixes to descriptions of diagnostic variables by Edward J. Huff
* Fixes to AbstractSelectorLoop.queueClose*, connection close notifications were being 
missed.
* Catch all throwables thrown by process() processing maintenance queue

Minor/future
* Notes on inserts (attacks, NGRouting)
* Give the ref to the GPL on the RNF page a filename
* Even more logging improvements
* More minor reindenting/restyling


Index: ConnectionOpener.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/ConnectionOpener.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ConnectionOpener.java       15 Aug 2003 00:09:34 -0000      1.7
+++ ConnectionOpener.java       30 Aug 2003 23:16:51 -0000      1.8
@@ -1,4 +1,5 @@
 package freenet.node;
+import freenet.ConnectionHandler;
 import freenet.Identity;
 import freenet.node.rt.RoutingTable;
 import freenet.node.Node;
@@ -20,15 +21,25 @@
     int startBackoffDelay=1000;
     protected boolean isUnscheduled = true;
     public static final Hashtable connOpeners = new Hashtable();
+    protected boolean logDEBUG;
+    
+    public String toString() {
+       return super.toString()+": isUnscheduled="+isUnscheduled;
+    }
     
     public static void scheduleConnectionOpener(NodeReference ref, 
                                                RoutingTable rt, 
                                                Node n) {
+       if(n.logger.shouldLog(Logger.DEBUG))
+           n.logger.log(ConnectionOpener.class, 
+                        "Scheduling ConnectionOpener for "+ref,
+                        Logger.DEBUG);
        Identity i = ref.getIdentity();
        if(!rt.references(i)) {
-           Core.logger.log(ConnectionOpener.class, 
-                           "rt does not reference "+ref+": "+i,
-                           Logger.DEBUG);
+           if(Core.logger.shouldLog(Logger.DEBUG))
+               Core.logger.log(ConnectionOpener.class, 
+                               "rt does not reference "+ref+": "+i,
+                               Logger.DEBUG);
            return;
        }
        synchronized(connOpeners) {
@@ -36,8 +47,9 @@
            if(co == null) {
                co = new ConnectionOpener(ref, rt, n);
                connOpeners.put(i, co);
-               Core.logger.log(co, "Created "+co+" for "+ref,
-                               Logger.DEBUG);
+               if(Core.logger.shouldLog(Logger.DEBUG))
+                   Core.logger.log(co, "Created "+co+" for "+ref,
+                                   Logger.DEBUG);
            }
            co.reschedule();
        }
@@ -48,6 +60,7 @@
        this.rt = rt;
        this.node = node;
        this.id = ref.getIdentity();
+       logDEBUG = node.logger.shouldLog(Logger.DEBUG);
     }
     
     public String getCheckpointName() {
@@ -55,14 +68,26 @@
     }
     
     public long nextCheckpoint() {
-       if((!rt.references(id)) || 
-          (node.connections.findFreeConnection(id) != null)) {
+       logDEBUG = node.logger.shouldLog(Logger.DEBUG);
+       if(logDEBUG)
+           node.logger.log(this, "nextCheckpoint() on "+this,
+                           Logger.DEBUG);
+       boolean rtReferencesMe = rt.references(id);
+       boolean hasFreeConn = node.connections.findFreeConnection(id) != null;
+       if((!rtReferencesMe) || hasFreeConn) {
+           if(logDEBUG)
+               node.logger.log(this, "unscheduling "+this+" (open conns: "+
+                               hasFreeConn+", in RT: "+
+                               rtReferencesMe+")", Logger.DEBUG);
            isUnscheduled = true;
            synchronized(connOpeners) {
                connOpeners.remove(id);
            }
            return -1;
        }
+       if(logDEBUG)
+           node.logger.log(this, "Scheduling in "+currentDelay+
+                           "ms", Logger.DEBUG);
        return System.currentTimeMillis()+currentDelay;
     }
     
@@ -71,28 +96,52 @@
     }
     
     public synchronized void reschedule() {
+       if(logDEBUG)
+           node.logger.log(this, "Rescheduling "+this,
+                           new Exception("debug"), Logger.DEBUG);
        if(isUnscheduled) {
-           new Checkpoint(this).schedule(node);
            isUnscheduled = false;
+           if(logDEBUG)
+               node.logger.log(this, "Was unscheduled: "+this,
+                               Logger.DEBUG);
+           new Checkpoint(this).schedule(node);
            connOpeners.put(id, this);
-       }
+           if(logDEBUG)
+               node.logger.log(this, "Rescheduled: "+this,
+                               Logger.DEBUG);
+       } else {
+           if(logDEBUG) 
+               node.logger.log(this, "Was already scheduled: "+this, 
+                               Logger.DEBUG); }
     }
     
     public void checkpoint() {
+       logDEBUG = node.logger.shouldLog(Logger.DEBUG);
+       if(logDEBUG)
+           node.logger.log(this, "Running checkpoint on "+this,
+                           Logger.DEBUG);
        Identity i = ref.getIdentity();
        if(!rt.references(i)) return;
        if(node.connections.findFreeConnection(id) != null) return;
+       long startTime = System.currentTimeMillis();
        try {
            Core.logger.log(this, "Opening connection to "+ref,
                            Logger.MINOR);
-           node.makeConnection(ref, -1); // -1 means run blocking
+           ConnectionHandler ch = 
+               node.makeConnection(ref, -1); // -1 means run blocking
+           long diff = System.currentTimeMillis() - startTime;
+           if(!ch.isCached()) rt.reportConnectionSuccess(id, diff);
+           // FIXME: possible race on isCached?
            Core.logger.log(this, "Opened connection to "+ref,
                            Logger.MINOR);
            currentDelay = 0;
            baseBackoffDelay = 0;
        } catch (CommunicationException e) {
            Core.logger.log(this, "Could not establish connection to "+ref+
-                           ": "+e, e, Logger.MINOR);
+                           ": "+e+" ("+this+")", e, Logger.MINOR);
+           if(startTime > 0)
+               rt.reportConnectionFailure(id, System.currentTimeMillis() -
+                                          startTime);
            if(currentDelay == 0) {
                baseBackoffDelay = startBackoffDelay;
                currentDelay = startBackoffDelay +
@@ -102,6 +151,9 @@
                currentDelay = (baseBackoffDelay >> 1) +
                    Core.randSource.nextInt(baseBackoffDelay >> 1);
            }
+           if(Core.logger.shouldLog(Logger.DEBUG))
+               Core.logger.log(this, "Rescheduling "+this+" in "+
+                               currentDelay+"ms", Logger.DEBUG);
        }
     }
 }

Index: Main.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/Main.java,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -r1.253 -r1.254
--- Main.java   15 Aug 2003 16:05:45 -0000      1.253
+++ Main.java   30 Aug 2003 23:16:51 -0000      1.254
@@ -74,6 +74,7 @@
     public static File paramFile;
     static NodeConfigUpdater configUpdater = null;
        static FnpLinkManager FNPmgr = null;
+       public static RoutingTable origRT;
     
     static public FileLoggerHook loggerHook() {
                return loggerHook;
@@ -191,8 +192,7 @@
             }
                        
             args = sw.getArgs();  // remove switches recognized so far
-                       
-            params = new Params(Node.config.getOptions());
+            params = new Params(Node.getConfig().getOptions());
             
             // attempt to load config file
             String paramFileString = sw.getParam("paramFile");
@@ -258,7 +258,7 @@
                        // kind of user permissions
                        if (params.getBoolean("publicNode")) {
                                Main.publicNode = true;
-                               
Node.config.addOption("mainport.params.servlet.7.params.sfDisableWriteToDisk", 1, 
true, 4181);
+                               
Node.getConfig().addOption("mainport.params.servlet.7.params.sfDisableWriteToDisk", 1, 
true, 4181);
                        }
                        
             // set up runtime logging
@@ -376,7 +376,7 @@
                        if(ipDetectorInterval > 0)
                                ipDetector = new 
IPAddressDetector(ipDetectorInterval*1000);
                        else ipDetector = null;
-                       
+           
             // get the node's physical addresses
             Address[] addr;
             try {
@@ -697,25 +697,70 @@
                        if(maxARKLookups<0) maxARKLookups = -maxARKLookups;
                        System.gc();
                        System.runFinalization();
-                       CPAlgoRoutingTable origRT = 
-                               new CPAlgoRoutingTable(routingStore,
-                                                                          
Node.rtMaxNodes,
-                                                                          
Node.rtMaxRefs,
-                                                                          
Node.failuresLookupARK,
-                                                                          
Node.minARKDelay,
-                                                                          Node.minCP,
-                                                                          
maxARKLookups,
-                                                                          
Core.randSource);
-           
-            RoutingTable rt = origRT;
-           
+                       RoutingTable rt;
+                       if(Node.routingTableImpl.equalsIgnoreCase("classic")) {
+                               CPAlgoRoutingTable cprt = 
+                                       new CPAlgoRoutingTable(routingStore,
+                                                                                  
Node.rtMaxNodes,
+                                                                                  
Node.rtMaxRefs,
+                                                                                  
Node.failuresLookupARK,
+                                                                                  
Node.minARKDelay,
+                                                                                  
Node.minCP,
+                                                                                  
maxARKLookups,
+                                                                                  
Core.randSource);
+                               
+                               rt = cprt;
+                       } else if(Node.routingTableImpl.equalsIgnoreCase("ng")) {
+                               RunningAverageFactory raf = 
+                                       DecayingRunningAverage.factory();
+                               TimeEstimatorFactory tef = 
+                                       ResponseTimeEstimator.factory();
+                               NodeEstimatorFactory nef = 
+                                       new StandardNodeEstimatorFactory(raf, tef);
+                               double initFastestTransfer;
+                               // FIXME: put this in Node as a param
+                               if(Node.inputBandwidthLimit != 0) {
+                                       initFastestTransfer = 
+                                               (double)Node.inputBandwidthLimit / 
1000.0;
+                                       Core.logger.log(Main.class, "From input: "+
+                                                                       
initFastestTransfer, Logger.NORMAL);
+                               } else if(Node.outputBandwidthLimit != 0) {
+                                       initFastestTransfer =
+                                               (double)Node.outputBandwidthLimit * 4 
/ 1000.0;
+                                       // total guess
+                                       Core.logger.log(Main.class, "From output: "+
+                                                                       
initFastestTransfer, Logger.NORMAL);
+                               } else {
+                                       initFastestTransfer = 128.0 / 1000.0;
+                                       Core.logger.log(Main.class, "From default: "+
+                                                                       
initFastestTransfer, Logger.NORMAL);
+                                       // COMPLETE guess!
+                               }
+                               Core.logger.log(Main.class, "Setting default 
initTransferRate"+
+                                                               " to 
"+initFastestTransfer, Logger.NORMAL);
+                               NGRoutingTable ngrt = 
+                                       new NGRoutingTable(routingStore, 
Node.rtMaxNodes,
+                                                                          nef, tef, 
initFastestTransfer);
+                               Core.logger.log(Main.class, "Created new NGRT",
+                                                               Logger.NORMAL);
+                               rt = ngrt;
+                       } else {
+                               String s = "Invalid routingTableImpl 
"+Node.routingTableImpl;
+                               Core.logger.log(Main.class, s, Logger.ERROR);
+                               System.err.println(s);
+                               loggerHook.close();
+                               rt = null; // grr javac
+                               System.exit(1);
+                       }
+                       
             //              RoutingTable rt = new 
ProbabilityRoutingTable(routingStore,
             //                                                            
Node.rtMaxNodes,
             //                                                            
Node.rtMaxRefs,
             //                                                            
Core.randSource);
-
-            rt = new FilterRoutingTable(rt, privateKey.getIdentity());
-
+                       
+                       origRT = rt;
+                   rt = new FilterRoutingTable(rt, privateKey.getIdentity());
+                       
             // load FT
 
             FailureTable ft = 
@@ -786,13 +831,17 @@
             LoadStats loadStats = new LoadStats(lsNodes, 100, Core.diagnostics,
                                                 null, 
                                                                                       
         Node.defaultResetProbability);
-           
+                       
+                       Core.logger.log(Main.class, "Loaded stats", Logger.NORMAL);
+                       
                        BucketFactory bf = loadTempBucketFactory(params, storeFiles[0],
                                                                                       
                  Node.routingDir);
-           
+                       Core.logger.log(Main.class, "Loaded bucket factory",
+                                                       Logger.NORMAL);
+                       
                        if(rt.initialRefsCount() != 0)
                                firstTime = false;
-
+                       
             try {
                 // --seed
                 // (now that we have the routing table)
@@ -805,7 +854,7 @@
                 
                 // run node
                 else {
-            
+                                       
                     // load seed nodes
                     NodeReference[] seedNodes = null;
                     String seedNodesFile = params.getString("seedFile");
@@ -867,9 +916,9 @@
                     node = new Node(privateKey, myRef, dir, bf, ds, rt,
                                                                        ft, th, sh, 
ph, loadStats, 
                                                                        isTransient);
-
-                                       origRT.setNode(node);
-                   
+                                       if(origRT instanceof StoredRoutingTable)
+                                               
((StoredRoutingTable)origRT).setNode(node);
+                                       
                                        // write the new IP address into the node file
                                        if(addr.length > 0)
                                                writeNodeFile();
@@ -900,7 +949,9 @@
                     if (params.getBoolean("watchme")) {
                         new Checkpoint(watchme).schedule(node);
                     }
-
+                                       
+                                       if(origRT instanceof NGRoutingTable)
+                                               new 
Checkpoint((NGRoutingTable)origRT).schedule(node);
                                        // schedule ARK insertion
                                        try {
                                                synchronized(ARKInserterLock) {
@@ -1007,8 +1058,17 @@
                                                        
+e.getClass().getName()+"\n"+s.toString(),
                                                        Logger.ERROR);
                        throw e;
-               }
-        finally {
+               } catch (OutOfMemoryError e) {
+                       System.gc();
+                       System.runFinalization();
+                       System.gc();
+                       System.runFinalization();
+                       System.err.println("Caught, in Main:");
+                       System.err.println(e);
+                       System.gc();
+                       System.runFinalization();
+                       e.printStackTrace(System.err);
+               } finally {
             Core.randSource.close();
         }
     }
@@ -1310,7 +1370,6 @@
         // it for rate limiting in Node.acceptRequest().
         node.threadFactory = tf;
 
-        // Use at most half as many connections as we have threads.
                int maxConn = node.maxNodeConnections;
        
                if(Node.isWin95)
@@ -1616,6 +1675,7 @@
                        d.registerCounting("outputBytesLow", d.MINUTE,
                                                           "Low priority external 
bytes written via TCP.",
                                                           transport);
+                       
             tcpConnection.logBytes = true;
         }
         
@@ -1663,10 +1723,10 @@
                              "The amount of time it takes to authorize new " +
                              "connections. In ms.", outConn);
         d.registerBinomial("connectionRatio", d.MINUTE,
-                           "The successrate of new outbound connections.", outConn);
+                           "The success rate of new outbound connections.", outConn);
         d.registerBinomial("outboundRestartRatio", d.MINUTE,
                            "The number of outbound connections that " + 
-                           "restart an excisting session (key).",outConn);
+                           "restart an existing session (key).",outConn);
 
         // inbound connections
 
@@ -1695,7 +1755,7 @@
                            inConn);
         d.registerBinomial("inboundRestartRatio", d.MINUTE,
                            "The number of inbound connections that " + 
-                           "restart an excisting session (key).", inConn);
+                           "restart an existing session (key).", inConn);
                d.registerCounting("readinessSelectionScrewed", d.MINUTE,
                                                   "The number of times NIO makes a 
zero byte "+
                                                   "read after the JVM told it that 
the socket "+
@@ -1803,7 +1863,7 @@
         d.registerBinomial("inboundAggregateRequests", d.MINUTE,
                            "The number of inbound queries of all types." +
                            "If the request is not QueryRejected by the rate " +
-                           "limiting it counts as a succees.",
+                           "limiting it counts as a success.",
                            messages);
 
 
@@ -1827,7 +1887,7 @@
 
         d.registerCounting("restartedRequests", d.HOUR,
                            "The number of (Insert/Data)requests that were "
-                           + "restarted at this node do responce timeout. " +
+                           + "restarted at this node due to response timeout. " +
                            "This is no longer used, see " + 
                            "restartedRequestAccepted.",
                            messages);
@@ -1898,7 +1958,7 @@
                d.registerContinuous("messageSendInterarrivalTime", d.MINUTE,
                                                "Time between two messages getting 
enqueued - needed for queueing theory analysis", messages);
                d.registerContinuous("messageSendInterarrivalTimeNoQR", d.MINUTE,
-                                               "interarrivals, no QR", messages);
+                                               "inter-arrivals, no QR", messages);
                d.registerContinuous("messageSendServiceTime",d.MINUTE,
                                                "Time it takes to send the message 
after out of the queue", messages);
                d.registerContinuous("messageSendServiceTimeNoQR",d.MINUTE,
@@ -1911,11 +1971,34 @@
                d.registerContinuous("messagesInPacketReceived", d.MINUTE,
                                                         "Number of messages in a 
received packet",
                                                         messages);
-               
+               d.registerBinomial("messageSuccessRatio", d.MINUTE,
+                                                  "The number of message sends 
attempted, "+
+                                                  "and the number that succeeded.", 
messages);
+               d.registerContinuous("normalizedSuccessTime", d.MINUTE,
+                                                        "Time to successfully find 
and transfer a file, "+
+                                                        "normalized for size equal to 
the store average "+
+                                                        "file size", messages);
+               d.registerContinuous("successSearchTime", d.MINUTE,
+                                                        "Search time for successful 
requests",
+                                                        messages);
+               d.registerContinuous("successTransferRate", d.MINUTE,
+                                                        "Transfer rate for successful 
requests",
+                                                        messages);
+               d.registerBinomial("requestSuccessRatio", d.MINUTE,
+                                                  "The number of requests started, 
and the "+
+                                                  "number that successfully returned 
data.", 
+                                                  messages);
+               d.registerBinomial("requestFailureRoutingOrNotRatio", d.MINUTE,
+                                                  "The number of failing requests, 
and the "+
+                                                  "number that failed due to 
routing.",
+                                                  messages);
+               d.registerBinomial("routingSuccessRatio", d.MINUTE,
+                                                  "Requests that failed or succeeded 
by routing, "+
+                                                  "and the number that succeeded.", 
messages);
         d.registerBinomial("receivedData", d.MINUTE,
                            "The number of times data was received, and " + 
                            "whether receiving was successful.", messages);
-       
+               
         d.registerBinomial("sentData", d.MINUTE,
                            "The number of times data was sent, and whether " +
                            "sending was successful.", messages);
@@ -2209,7 +2292,7 @@
         System.out.println("");
         System.out.println("Configurable options");
         System.out.println("--------------------");
-        Node.config.printUsage(System.out);
+        Node.getConfig().printUsage(System.out);
         System.out.println("");
         System.out.println("Command-line switches");
         System.out.println("---------------------");
@@ -2264,7 +2347,7 @@
         out.println("These can reside either in the configuration file " +
                     "or be given as command line arguments.");
         out.println("<hr>");
-        Core.config.printManual(out);
+        Core.getConfig().printManual(out);
 
     }
 
@@ -2592,8 +2675,6 @@
                                "\nNIOOS " + 
freenet.support.io.NIOOutputStream.instances+
                                "\nNIOIS " + 
freenet.support.io.NIOInputStream.instances+
                                "\nCH " + freenet.ConnectionHandler.instances+
-//                             "\nCH open but not on OCM " + 
-//                             freenet.ConnectionHandler.openButNotOnOCM +
                                //"\nCH terminated " + 
freenet.ConnectionHandler.terminatedInstances+
                                "\nCHIS " +freenet.ConnectionHandler.CHISinstances+
                                "\nCHOS " +freenet.ConnectionHandler.CHOSinstances+

Index: Node.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/Node.java,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -r1.205 -r1.206
--- Node.java   15 Aug 2003 23:22:59 -0000      1.205
+++ Node.java   30 Aug 2003 23:16:51 -0000      1.206
@@ -49,7 +49,7 @@
     public static String sysName = System.getProperty("os.name");
     
     static {
-
+               Config config = getConfig();
         // internal defaults
         config.addOption("rtMaxRefs",           1, 50,  1300);   // 50 refs/node
        
@@ -141,6 +141,7 @@
         config.addOption("fcpHosts",   1, "",              112);  // loopback only
         config.addOption("transient",  1, false,           300);
         config.addOption("seedFile",   1, "seednodes.ref", 320);
+       config.addOption("routingTableImpl",1,"ng",   330);
         
         // logging options
         config.addOption("logLevel",  1, "normal",      1250);     
@@ -175,7 +176,7 @@
        config.addOption("distributionURIOverride", 1, "",   1555);
        config.addOption("aggressiveGC", 1, 15,              1556);
        config.addOption("configUpdateInterval", 1, 5,       1557);
-       config.addOption("defaultToSimpleUIMode",  1, true,  1558);
+       config.addOption("defaultToSimpleUIMode",  1, true,   1558);
        config.addOption("ipDetectorInterval", 1, 10,        1559);
 
        
@@ -750,7 +751,12 @@
             "there is no previously existing reference to that node.  When this node",
             "announces, it will announce to the nodes listed in this file."
         );
-
+       
+       // routingTableImpl
+       config.setExpert("routingTableImpl", true);
+       config.argDesc  ("routingTableImpl", "classic or ng");
+       config.longDesc ("routingTableImpl", "Set to ng for the Next Generation 
Routing implementation, classic for the old Freenet routing algorithm.");
+       
         // doAnnounce
        config.setExpert ("doAnnounce", true);
         config.argDesc   ("doAnnounce", "yes|no");
@@ -1691,6 +1697,7 @@
     static public float cacheProbPerHop;
     static public float minStoreFullPCache;
     static public float minRTFullPRef;
+    static public String routingTableImpl;
 
     // announcement options
     static public int announcementAttempts;
@@ -1853,6 +1860,7 @@
        cacheProbPerHop = params.getFloat("cacheProbPerHop");
        minStoreFullPCache = params.getFloat("minStoreFullPCache");
        minRTFullPRef = params.getFloat("minRTFullPRef");
+       routingTableImpl = params.getString("routingTableImpl");
         announcementAttempts = params.getInt("announcementAttempts");
        announcementThreads = params.getInt("announcementThreads");
         initialRequests = params.getInt("initialRequests");
@@ -1905,7 +1913,7 @@
                                  
(int)(averageOutputBandwidthLimit*lowLevelBWLimitMultiplier),
                                  Bandwidth.SENT);
            } else obw = null;
-        }
+       }
        
        if(params.getBoolean("limitAll")) {
            logger.log(Node.class, "Limiting all connections",

Index: NodeConfigUpdater.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/NodeConfigUpdater.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NodeConfigUpdater.java      30 Jul 2003 03:48:53 -0000      1.11
+++ NodeConfigUpdater.java      30 Aug 2003 23:16:51 -0000      1.12
@@ -60,7 +60,7 @@
      */
     public NodeConfigUpdater(int updateInterval) throws Throwable {
         this.updateInterval = updateInterval;
-        oldParams = new Params(Node.config.getOptions());
+        oldParams = new Params(Node.getConfig().getOptions());
         lastModified = Main.paramFile.lastModified();
         oldParams.readParams(Main.paramFile);
        fireUpdates(oldParams);
@@ -81,7 +81,7 @@
        synchronized(syncOb()) {
             if (Main.paramFile.lastModified() == lastModified) return;
             lastModified = Main.paramFile.lastModified();
-            newParams = new Params(Node.config.getOptions());
+            newParams = new Params(Node.getConfig().getOptions());
             try {
                 newParams.readParams(Main.paramFile);
             } catch (Throwable e) {

Index: StateChain.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/StateChain.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- StateChain.java     1 Jul 2003 16:07:36 -0000       1.20
+++ StateChain.java     30 Aug 2003 23:16:51 -0000      1.21
@@ -210,8 +210,7 @@
                node.logger.log(StateChain.class,
                                "Chain " + Fields.longToHex(state.id()) + 
                                " state change: " + state.getName() + " -> " +
-                               newState.getName(), new Exception("debug"),
-                               Logger.DEBUG);
+                               newState.getName(), Logger.DEBUG);
         }
         
         // okay, watch out for weirdo recursion problems..

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

Reply via email to