[freenet-cvs] r17541 - trunk/freenet/src/freenet/client/async
toad at freenetproject.org
toad at freenetproject.org
Tue Feb 5 00:42:46 UTC 2008
Author: toad
Date: 2008-02-05 00:42:46 +0000 (Tue, 05 Feb 2008)
New Revision: 17541
Modified:
trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
Log:
Really fix NPE
Modified: trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java 2008-02-05 00:41:27 UTC (rev 17540)
+++ trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java 2008-02-05 00:42:46 UTC (rev 17541)
@@ -363,7 +363,7 @@
priority = fuzz<0 ? tweakedPrioritySelector[random.nextInt(tweakedPrioritySelector.length)] : prioritySelector[Math.abs(fuzz % prioritySelector.length)];
result = priorities[priority];
if((result != null) &&
- (!result.isEmpty()) || (!offeredKeys[priority].isEmpty())) {
+ (!result.isEmpty()) || (tryOfferedKeys && !offeredKeys[priority].isEmpty())) {
if(logMINOR) Logger.minor(this, "using priority : "+priority);
return priority;
}
More information about the cvs
mailing list