Author: toad
Date: 2007-06-11 17:59:32 +0000 (Mon, 11 Jun 2007)
New Revision: 13516

Modified:
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
Log when no common negType, rather than sending a packet with negType=-1.

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java        2007-06-11 
11:32:42 UTC (rev 13515)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java        2007-06-11 
17:59:32 UTC (rev 13516)
@@ -1467,6 +1467,10 @@
         */
     public void sendHandshake(PeerNode pn) {
        int negType = pn.bestNegType(this);
+       if(negType == -1) {
+               Logger.error(this, "Could not negotiate with "+pn+" : no common 
negTypes available!: his negTypes: "+pn.negTypes+" my negTypes: 
"+supportedNegTypes());
+               return;
+       }
        if(logMINOR) Logger.minor(this, "Possibly sending handshake to "+pn+" 
negotiation type "+negType);
         DiffieHellmanContext ctx;
         Peer[] handshakeIPs;


Reply via email to