Author: toad
Date: 2006-10-05 15:27:25 +0000 (Thu, 05 Oct 2006)
New Revision: 10608

Modified:
   trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java
   trunk/freenet/src/freenet/client/async/USKChecker.java
   trunk/freenet/src/freenet/client/async/USKFetcher.java
Log:
USK logging, maxRetries=0 means 1 try and no retries.

Modified: trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java   
2006-10-05 13:49:09 UTC (rev 10607)
+++ trunk/freenet/src/freenet/client/async/BaseSingleFileFetcher.java   
2006-10-05 15:27:25 UTC (rev 10608)
@@ -62,8 +62,8 @@
                retryCount++;
                if(Logger.shouldLog(Logger.MINOR, this))
                        Logger.minor(this, "Attempting to retry... (max 
"+maxRetries+", current "+retryCount+")");
-               // We want 0, 1, ... maxRetries i.e. maxRetries+1 attempts 
(maxRetries=0 => try once)
-               if((retryCount <= maxRetries) || (maxRetries == -1)) {
+               // We want 0, 1, ... maxRetries i.e. maxRetries+1 attempts 
(maxRetries=0 => try once, NO RETRIES)
+               if((retryCount < maxRetries) || (maxRetries == -1)) {
                        schedule();
                        return true;
                }

Modified: trunk/freenet/src/freenet/client/async/USKChecker.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKChecker.java      2006-10-05 
13:49:09 UTC (rev 10607)
+++ trunk/freenet/src/freenet/client/async/USKChecker.java      2006-10-05 
15:27:25 UTC (rev 10608)
@@ -77,7 +77,7 @@
        }

        public String toString() {
-               return "USKChecker for "+key.getURI();
+               return "USKChecker for "+key.getURI()+" for "+cb;
        }

        public short getPriorityClass() {

Modified: trunk/freenet/src/freenet/client/async/USKFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKFetcher.java      2006-10-05 
13:49:09 UTC (rev 10607)
+++ trunk/freenet/src/freenet/client/async/USKFetcher.java      2006-10-05 
15:27:25 UTC (rev 10608)
@@ -152,7 +152,7 @@
                }

                public String toString() {
-                       return "USKAttempt for "+number+" for 
"+origUSK.getURI();
+                       return "USKAttempt for "+number+" for 
"+origUSK.getURI()+" for "+USKFetcher.this;
                }

                public short getPriority() {


Reply via email to