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

Modified Files:
        tcpAddress.java 
Log Message:
Blacklist connections who are rapidly failing a lot, this should help with a lot of 
the CPU overload on 6205, also fix the hashCode from tcpAddress and therefore from 
Peer, this could have been another whole bug of it's own.

Index: tcpAddress.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/transport/tcpAddress.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- tcpAddress.java     12 Sep 2003 01:52:26 -0000      1.15
+++ tcpAddress.java     23 Sep 2003 00:55:10 -0000      1.16
@@ -65,7 +65,8 @@
         this.host = host;
        if(host!=null) {
            valname = host.getHostAddress();
-           hashCode = port ^ host.hashCode() ^ valname.hashCode();
+        
+           hashCode = port ^ valname.hashCode();//host.hashCode() ^ 
valname.hashCode();
        } else {
            hashCode = port;
            valname = "";
@@ -82,8 +83,8 @@
        hostName = hostname;
        host = null;
        //doDeferredLookup();
-       hashCode = port ^ hostname.hashCode();
         valname = hostname;
+       hashCode = port ^ valname.hashCode();
     }
 
     /** 
@@ -105,7 +106,7 @@
             throw new BadAddressException(""+e);
         }
         setPort(Integer.parseInt(str.substring(colon + 1)));
-       hashCode = port ^ host.hashCode();
+       hashCode = port ^ valname.hashCode();
     }
     
     public final void doDeferredLookup() throws UnknownHostException {

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

Reply via email to