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

Modified Files:
        ConnectionHandler.java PeerHandler.java PeerPacketMessage.java 
        Version.java 
Log Message:
6274:
Logging, toString(), try to catch a bizarre crash reported by hirvox, and wierd stuff 
with messages being delayed rather than dropped locally.
Verify Identify messages' NodeRefs
The connhandler ref takes precedence over the ref in the Request. If no connhandler 
ref, and the Request ref is signed, set the ref on the ConnHandler to the Request ref.
Basic idea is to cut verifications, which may have been killing the RSL.
Up lastGoodBuild to 6270.


Index: ConnectionHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -w -r1.194 -r1.195
--- ConnectionHandler.java      22 Oct 2003 12:32:07 -0000      1.194
+++ ConnectionHandler.java      23 Oct 2003 18:12:34 -0000      1.195
@@ -700,8 +700,18 @@
                                                        // Read any padding
                                                        int i=0;
                                                        for(i=0;i<decryptLen;i++) {
+                                                               // FIXME: trying to 
catch an annoying crash (for hirvox)
+                                                               byte[] b = 
_accumulator;
+                                                               if(b == null) {
+                                                                       
Core.logger.log(this, "Null _accumulator in innerProcess()!! for "+this, Logger.ERROR);
+                                                                       break;
+                                                               } else if(b.length <= 
i) {
+                                                                       
Core.logger.log(this, "buffer too short: buffer length is "+b.length+", index is "+i, 
Logger.ERROR);
+                                                                       break;
+                                                               } else {
                                                                if(_accumulator[i] != 
0)
                                                                        break;
+                                                               }
                                                                // No max padding 
because we wouldn't do anything different
                                                        }
                                                        if(logDEBUG) logDEBUG(i+" 
bytes of padding");
@@ -2334,6 +2344,11 @@
        
        public final NodeReference targetReference() {
                return otherRef;
+       }
+       
+       public final void setTargetReference(NodeReference ref) {
+               if(ref != null)
+                       otherRef = ref;
        }
        
     /**

Index: PeerHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/PeerHandler.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -w -r1.36 -r1.37
--- PeerHandler.java    21 Oct 2003 11:04:52 -0000      1.36
+++ PeerHandler.java    23 Oct 2003 18:12:35 -0000      1.37
@@ -578,6 +578,11 @@
                        if(logDEBUG) 
                                Core.logger.log(this, "Failed to send packet, no more 
conns, " + "no way to open connection: DISCARDING " + pm + " on " + this, id == null ? 
Logger.NORMAL : Logger.MINOR); // id == null => FCP
                        return;
+               } else {
+                       if(logDEBUG)
+                               Core.logger.log(this, "handlersSendingPacket = 
"+handlersSendingPackets+
+                                                               ", 
probablyNotContactable() = "+probablyNotConnectable(),
+                                                               Logger.DEBUG);
                }
                if (pm.priority == EXPENDABLE) {
                        Core.logger.log(this, "Discarding low priority message " + pm 
+ " on " + this, Logger.MINOR);

Index: PeerPacketMessage.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/PeerPacketMessage.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -w -r1.15 -r1.16
--- PeerPacketMessage.java      22 Oct 2003 12:32:06 -0000      1.15
+++ PeerPacketMessage.java      23 Oct 2003 18:12:35 -0000      1.16
@@ -1,3 +1,4 @@
+/* -*- Mode: java; c-basic-indent: 4; tab-width: 4 -*- */
 package freenet;
 import freenet.Core;
 import freenet.support.Logger;
@@ -28,7 +29,8 @@
     
     
     public String toString() {
-               return super.toString() + ":" + msg + ":" + raw + ":" + cb + ":" + 
finished;
+               return super.toString() + ":" + msg + ":" + raw + ":" + cb + ":" + 
finished +
+                       ", prio="+priority;
        }
 
        public PeerPacketMessage(Identity i, Message msg, MessageSendCallback cb, int 
priority, long expires, PeerHandler ph) {

Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.466
retrieving revision 1.467
diff -u -w -r1.466 -r1.467
--- Version.java        23 Oct 2003 01:49:24 -0000      1.466
+++ Version.java        23 Oct 2003 18:12:35 -0000      1.467
@@ -18,13 +18,13 @@
     public static String protocolVersion = "1.47";
     
     /** The build number of the current revision */
-    public static final int buildNumber = 6273;
+    public static final int buildNumber = 6274;
     // 6028: may 3; ARK retrieval fix
 
     public static final int ignoreBuildsAfter = 6500;
     
     /** Oldest build of Fred we will talk to */
-    public static final int lastGoodBuild = 654; // jan 20; ARK insert fixes
+    public static final int lastGoodBuild = 6270; // jan 20; ARK insert fixes
 
     /** The highest reported build of fred */
     public static int highestSeenBuild = buildNumber;

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

Reply via email to