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

Modified Files:
        HistoryKeepingRoutingPointStore.java 
        StandardNodeEstimator.java RoutingPointStore.java 
        ResponseTimeEstimator.java 
Log Message:
6326:
Add fproxy option ?linkhtl=<htl>, which tells the filter to rewrite links to add 
?htl=<htl> to each inline image, link, inline, etc.
Add graph with points clipped on node status page.
Add diagnostic 'failureTableIgnoredDNFs'.
Logging, indenting, eclipse warnings.

Index: HistoryKeepingRoutingPointStore.java
===================================================================
RCS file: 
/cvsroot/freenet/freenet/src/freenet/node/rt/HistoryKeepingRoutingPointStore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- HistoryKeepingRoutingPointStore.java        4 Nov 2003 17:05:40 -0000       1.4
+++ HistoryKeepingRoutingPointStore.java        12 Nov 2003 01:11:02 -0000      1.5
@@ -10,8 +10,6 @@
 import java.util.LinkedList;
 
 import freenet.Key;
-import freenet.node.rt.RoutingPointStore.NeighbourRoutingPointPair;
-import freenet.node.rt.RoutingPointStore.RoutingPoint;
 
 /**
  * @author Iakin

Index: StandardNodeEstimator.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/rt/StandardNodeEstimator.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -w -r1.30 -r1.31
--- StandardNodeEstimator.java  11 Nov 2003 20:57:41 -0000      1.30
+++ StandardNodeEstimator.java  12 Nov 2003 01:11:02 -0000      1.31
@@ -109,9 +109,9 @@
                                                                 double 
initTransferRate, 
                                                                 boolean 
needConnection, double maxPDNF,
                                                                 long maxSearchTime, 
long maxDNFTime) {
-               Core.logger.log(this, "Creating new StandardNodeEstimator for "+ref+" 
("+ngrt+"), details:"+
-                               "mem = "+mem+", key="+k+", 
initTransferRate="+initTransferRate+", needConnection="+
-                               needConnection, Logger.NORMAL);
+               Core.logger.log(this, "New node in routing table 
(StandardNodeEstimator impl) for  "+
+                               ref+" ("+ngrt+"), details:"+"mem = "+mem+", key="+k+", 
initTransferRate="+
+                               initTransferRate+", needConnection="+needConnection, 
Logger.NORMAL);
                this.ngrt = ngrt;
                this.ref = ref;
                this.mem = mem;

Index: RoutingPointStore.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/rt/RoutingPointStore.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -r1.11 -r1.12
--- RoutingPointStore.java      11 Nov 2003 20:57:41 -0000      1.11
+++ RoutingPointStore.java      12 Nov 2003 01:11:02 -0000      1.12
@@ -5,15 +5,12 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.math.BigInteger;
-import java.util.ConcurrentModificationException;
 
-import javax.swing.text.html.MinimalHTMLWriter;
-
-import freenet.support.sort.QuickSorter;
-import freenet.support.sort.Sortable;
 import freenet.Core;
-import freenet.support.Logger;
 import freenet.Key;
+import freenet.support.Logger;
+import freenet.support.sort.QuickSorter;
+import freenet.support.sort.Sortable;
 
 /** @author Iakin
  * Created on Nov 2, 2003
@@ -348,10 +345,15 @@
        //Caller is responsible for making sure that there is proper synchronization
        //to prevent simultaneous access to 'points'
        public static void dumpLog(RoutingPoint[] points) {
-               if (Core.logger.shouldLog(Logger.MINOR)) {
+               if (Core.logger.shouldLog(Logger.MINOR, RoutingPointStore.class)) {
                        StringBuffer sb = new StringBuffer();
                        for (int x = 0; x < points.length; x++) {
-                               sb.append(points[x].key.toString(16));
+                               BigInteger k = points[x].key;
+                               if(k == null) {
+                                       Core.logger.log(RoutingPointStore.class, 
"points["+x+"].key=null!",
+                                                       new Exception("debug"), 
Logger.ERROR);
+                               }
+                               sb.append(k.toString(16));
                                sb.append(": ");
                                int t = points[x].time;
                                sb.append(Integer.toString(t));
@@ -363,6 +365,10 @@
                } else {
                        //Do only the sanity check if we wont log the contents of the 
estimator
                        for (int x = 0; x < points.length; x++) {
+                               if(points[x].key == null) {
+                                       Core.logger.log(RoutingPointStore.class, 
"points["+x+"].key=null!",
+                                                       new Exception("debug"), 
Logger.ERROR);
+                               }
                                int t = points[x].time;
                                if (t < 0)
                                        Core.logger.log(RoutingPointStore.class, 
"time[" + x + "]=" + t + " - NEGATIVE (" + RoutingPointStore.class +")", Logger.ERROR);

Index: ResponseTimeEstimator.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/rt/ResponseTimeEstimator.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -w -r1.37 -r1.38
--- ResponseTimeEstimator.java  11 Nov 2003 20:57:41 -0000      1.37
+++ ResponseTimeEstimator.java  12 Nov 2003 01:11:02 -0000      1.38
@@ -18,7 +18,6 @@
 import freenet.support.graph.BitmapEncoder;
 import freenet.support.graph.Color;
 import freenet.support.graph.DibEncoder;
-import freenet.support.graph.Rectangle;
 
 
 // class Key {
@@ -336,8 +335,8 @@
            store.sortByKey(); // if the edge wraps, over the next section, then we 
orderKeys before the next section is done, we are stuffed
        } else if(x == -1) {
            if(logDEBUG)
-               Core.logger.log(this, "Below half keyspace",
-                               Logger.DEBUG);
+               Core.logger.log(this, "Below half keyspace", Logger.DEBUG);
+           
            // We are below the half way point
            // n ... n+halfkeyspace moved left
            // 0 ... n moved right

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

Reply via email to