Author: nextgens
Date: 2008-07-22 13:43:24 +0000 (Tue, 22 Jul 2008)
New Revision: 21303

Modified:
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
logging

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java        2008-07-22 
09:55:48 UTC (rev 21302)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java        2008-07-22 
13:43:24 UTC (rev 21303)
@@ -339,7 +339,12 @@
                int ivLength = pcfb.lengthIV();
                int digestLength = HASH_LENGTH;
                if(length < digestLength + ivLength + 4) {
-                       if(logMINOR) Logger.minor(this, "Too short: "+length+" 
should be at least "+(digestLength + ivLength + 4));
+                       if(logMINOR) {
+                               if(buf.length < length)
+                                       Logger.debug(this, "The packet is 
smaller than the decrypted size: it's probably the wrong tracker 
("+buf.length+'<'+length+')');
+                               else
+                                       Logger.minor(this, "Too short: 
"+length+" should be at least "+(digestLength + ivLength + 4));
+                       }
                        return false;
                }
                // IV at the beginning


Reply via email to