Author: toad
Date: 2007-06-26 13:50:20 +0000 (Tue, 26 Jun 2007)
New Revision: 13761

Modified:
   trunk/freenet/src/freenet/node/NodeDispatcher.java
Log:
Increment counter on every hop to make traces easier to read

Modified: trunk/freenet/src/freenet/node/NodeDispatcher.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeDispatcher.java  2007-06-26 13:31:18 UTC 
(rev 13760)
+++ trunk/freenet/src/freenet/node/NodeDispatcher.java  2007-06-26 13:50:20 UTC 
(rev 13761)
@@ -550,7 +550,6 @@
                if(htl <= 1) htl = 1;
                ProbeContext ctx = null;
                boolean rejected = false;
-               boolean isNew = false;
                synchronized(recentProbeContexts) {
                        if(checkRecent) {
                                long now = System.currentTimeMillis();
@@ -558,14 +557,13 @@
                                        rejected = true;
                                } else {
                                        tLastReceivedProbeRequest = now;
-                                       counter++; // Accepted it; another hop
                                }
+                               counter++; // Increment on every hop even if we 
reject it, this makes it easier to read the trace
                        }
                        if(!rejected) {
                                ctx = (ProbeContext) 
recentProbeContexts.get(lid);
                                if(ctx == null) {
                                        ctx = new ProbeContext(id, target, 
best, nearest, htl, counter, src, cb);
-                                       isNew = true;
                                }
                                recentProbeContexts.push(lid, ctx); // promote 
or add
                                while(recentProbeContexts.size() > 
MAX_PROBE_CONTEXTS)


Reply via email to