Author: toad
Date: 2009-03-31 22:26:07 +0000 (Tue, 31 Mar 2009)
New Revision: 26285

Modified:
   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
Log:
Fix selecting low-priority transient requests rather than high priority 
persistent requests


Modified: 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2009-03-31 17:16:28 UTC (rev 26284)
+++ 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2009-03-31 22:26:07 UTC (rev 26285)
@@ -365,7 +365,9 @@
                                Logger.minor(this, "Nothing to do");
                        return null;
                }
-               for(;choosenPriorityClass <= 
RequestStarter.MINIMUM_PRIORITY_CLASS;choosenPriorityClass++) {
+               if(maxPrio >= RequestStarter.MINIMUM_PRIORITY_CLASS)
+                       maxPrio = RequestStarter.MINIMUM_PRIORITY_CLASS;
+               for(;choosenPriorityClass <= maxPrio;choosenPriorityClass++) {
                        if(logMINOR) Logger.minor(this, "Using priority 
"+choosenPriorityClass);
                if(tryOfferedKeys) {
                        if(offeredKeys[choosenPriorityClass].hasValidKeys(this, 
null, context))

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

Reply via email to