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

Modified Files:
      Tag: ngrouting
        ConnectionHandler.java OpenConnectionManager.java Version.java 
Log Message:
7049:
Logging.
Add new diag var, messageSuccessRatio.
Fix obscure (I hope...) NPE.
Schedule a new conn opener in NGRouting's check-for-open-conn when we need one.
Make count of RT nodes with open conns only include nodes with open conns *NOW*.
Change reporting of inserts, hopefully fix insertReplyTime not set errors.
Set acceptedTime when we set accepted, even if we don't actually get an Accepted.
Also zab's ASL work, and edward j. huff's typo fixes


Index: ConnectionHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v
retrieving revision 1.85.2.17
retrieving revision 1.85.2.18
diff -u -r1.85.2.17 -r1.85.2.18
--- ConnectionHandler.java      28 Aug 2003 00:35:17 -0000      1.85.2.17
+++ ConnectionHandler.java      30 Aug 2003 01:23:00 -0000      1.85.2.18
@@ -594,7 +594,7 @@
                                                                if(processLen == -1)
                                                                        throw new 
IllegalStateException("Read -1 bytes but still got a message!");
                                                                if(logDEBUG) 
logDEBUG("Got Message: "+m.toString()+
-                                                                                      
                   ", clearing buffer after read. Message was:\n"+new 
String(_accumulator, 0, decryptLen));
+                                                                                      
                   ", clearing buffer after read. Message was:\n"+new 
String(_accumulator, 0, processLen));
                                                                
                                                                
accumulator.position(processLen);
                                                                
accumulator.compact().flip();
@@ -2010,7 +2010,10 @@
                        }
                        //log the total time in queue
                        long t = System.currentTimeMillis() - startTime;
-                       if(success && sfe == null) {
+                       if(sfe != null) success = false;
+                       Core.diagnostics.occurrenceBinomial("messageSuccessRatio", 1,
+                                                                                      
         success ? 1 : 0);
+                       if(success) {
                                
Core.diagnostics.occurrenceContinuous("messageSendTime", t);
                                if(identity != null && 
Main.node.rt.references(identity))
                                        Core.diagnostics.
@@ -2271,7 +2274,7 @@
                                                } catch (SendFailedException e) {
                                                        Core.logger.log(this, "Got 
IOException trying to "+
                                                                                       
 "sendMessage: "+this, e, 
-                                                                                      
 Logger.NORMAL);
+                                                                                      
 Logger.MINOR);
                                                        ms = null;
                                                        throw e;
                                                }

Index: OpenConnectionManager.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/OpenConnectionManager.java,v
retrieving revision 1.77.2.7
retrieving revision 1.77.2.8
diff -u -r1.77.2.7 -r1.77.2.8
--- OpenConnectionManager.java  22 Aug 2003 01:51:33 -0000      1.77.2.7
+++ OpenConnectionManager.java  30 Aug 2003 01:23:00 -0000      1.77.2.8
@@ -1014,6 +1014,8 @@
                                        }
                                        NIOInputStream niois = (NIOInputStream) 
                                                ((tcpConnection)c).getUnderlyingIn();
+                                       if(niois == null)
+                                               throw new IOException("Already closed 
- wierd...");
                                        niois.setNextReader(ch);
                                        tcpConnection.getRSL().unregister(niois);
                                        while(niois.isRegistered() && 

Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.307.2.48
retrieving revision 1.307.2.49
diff -u -r1.307.2.48 -r1.307.2.49
--- Version.java        29 Aug 2003 23:31:41 -0000      1.307.2.48
+++ Version.java        30 Aug 2003 01:23:00 -0000      1.307.2.49
@@ -18,7 +18,7 @@
     public static String protocolVersion = "1.46";
     
     /** The build number of the current revision */
-    public static final int buildNumber = 7048;
+    public static final int buildNumber = 7049;
     // 6028: may 3; ARK retrieval fix
 
     public static final int ignoreBuildsAfter = 6500;

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

Reply via email to