Author: nextgens
Date: 2008-11-11 23:04:00 +0000 (Tue, 11 Nov 2008)
New Revision: 23497

Modified:
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
improve the logged message

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java        2008-11-11 
23:02:37 UTC (rev 23496)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java        2008-11-11 
23:04:00 UTC (rev 23497)
@@ -2832,8 +2832,10 @@
        private boolean maybeResetTransientKey() {
                long now = System.currentTimeMillis();
                boolean isCacheTooBig = true;
+               int authenticatorCacheSize = 0;
                synchronized (authenticatorCache) {
-                       if(authenticatorCache.size() < 
AUTHENTICATOR_CACHE_SIZE) {
+                       authenticatorCacheSize = authenticatorCache.size();
+                       if(authenticatorCacheSize < AUTHENTICATOR_CACHE_SIZE) {
                                isCacheTooBig = false;
                                if(now - timeLastReset < 
TRANSIENT_KEY_REKEYING_MIN_INTERVAL)
                                        return false;
@@ -2846,7 +2848,7 @@
                        authenticatorCache.clear();
                }
                node.getTicker().queueTimedJob(transientKeyRekeyer, 
"JFKmaybeResetTransitentKey "+now, TRANSIENT_KEY_REKEYING_MIN_INTERVAL, false);
-               Logger.normal(this, "JFK's TransientKey has been changed and 
the message cache flushed because "+(isCacheTooBig ? ("the cache is oversized 
("+authenticatorCache.size()+')') : "it's time to rekey")+ " on " + this);
+               Logger.normal(this, "JFK's TransientKey has been changed and 
the message cache flushed because "+(isCacheTooBig ? ("the cache is oversized 
("+authenticatorCacheSize+')') : "it's time to rekey")+ " on " + this);
                return true;
        }
 

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to