Author: toad
Date: 2008-08-12 22:48:28 +0000 (Tue, 12 Aug 2008)
New Revision: 21781

Modified:
   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
Log:
Prevent non-transient removeFirst from returning OfferedKeysList.
Logging.


Modified: 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2008-08-12 22:40:06 UTC (rev 21780)
+++ 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2008-08-12 22:48:28 UTC (rev 21781)
@@ -313,7 +313,7 @@
                if(logMINOR) Logger.minor(this, "removeFirst()");
                boolean tryOfferedKeys = offeredKeys != null && (!notTransient) 
&& random.nextBoolean();
                int choosenPriorityClass = 
removeFirstAccordingToPriorities(tryOfferedKeys, fuzz, random, offeredKeys, 
schedTransient, transientOnly, maxPrio, container);
-               if(choosenPriorityClass == -1 && offeredKeys != null && 
(!tryOfferedKeys)) {
+               if(choosenPriorityClass == -1 && offeredKeys != null && 
(!tryOfferedKeys) && (!notTransient)) {
                        tryOfferedKeys = true;
                        choosenPriorityClass = 
removeFirstAccordingToPriorities(tryOfferedKeys, fuzz, random, offeredKeys, 
schedTransient, transientOnly, maxPrio, container);
                }
@@ -684,7 +684,7 @@
                synchronized(keysFetching) {
                        boolean retval = keysFetching.add(key);
                        if(!retval) {
-                               Logger.error(this, "Already in keysFetching: 
"+key);
+                               Logger.normal(this, "Already in keysFetching: 
"+key);
                        } else {
                                if(logMINOR)
                                        Logger.minor(this, "Added to 
keysFetching: "+key);


Reply via email to