Author: toad
Date: 2007-02-21 23:36:53 +0000 (Wed, 21 Feb 2007)
New Revision: 11891

Modified:
   trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
   trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Logging

Modified: trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2007-02-21 22:14:14 UTC (rev 11890)
+++ trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java  
2007-02-21 23:36:53 UTC (rev 11891)
@@ -191,7 +191,7 @@
                                                return;
                                        }
                                        if(block != null) {
-                                               if(logMINOR) Logger.minor(this, 
"Can fulfill "+req+" immediately from store");
+                                               if(logMINOR) Logger.minor(this, 
"Can fulfill "+req+" ("+tok+") immediately from store");
                                                getter.onSuccess(block, true, 
tok);
                                        } else {
                                                anyValid = true;

Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2007-02-21 22:14:14 UTC (rev 11890)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSegment.java 
2007-02-21 23:36:53 UTC (rev 11891)
@@ -307,8 +307,8 @@
        /** A request has failed non-fatally, so the block may be retried */
        public void onNonFatalFailure(FetchException e, int blockNo) {
                int tries;
+               int maxTries = blockFetchContext.maxNonSplitfileRetries;
                synchronized(this) {
-                       int maxTries = blockFetchContext.maxNonSplitfileRetries;
                        if(blockNo < dataKeys.length) {
                                tries = ++dataRetries[blockNo];
                                if(tries > maxTries && maxTries >= 0) {
@@ -327,7 +327,7 @@
                // If we are here we are going to retry
                SplitFileFetcherSubSegment sub = getSubSegment(tries);
                if(logMINOR)
-                       Logger.minor(this, "Retrying block "+blockNo+" on 
"+this+" : tries="+tries+" : "+sub);
+                       Logger.minor(this, "Retrying block "+blockNo+" on 
"+this+" : tries="+tries+"/"+maxTries+" : "+sub);
                sub.add(blockNo, false);
        }


Modified: trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2007-02-21 22:14:14 UTC (rev 11890)
+++ trunk/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java      
2007-02-21 23:36:53 UTC (rev 11891)
@@ -52,7 +52,11 @@
        }

        public ClientKey getKey(int token) {
-               if(segment.isFinishing()) return null;
+               if(segment.isFinishing()) {
+                       if(logMINOR)
+                               Logger.minor(this, "Segment is finishing when 
getting key "+token+" on "+this);
+                       return null;
+               }
                return segment.getBlockKey(token);
        }



Reply via email to