Author: toad
Date: 2008-06-25 16:15:41 +0000 (Wed, 25 Jun 2008)
New Revision: 20693

Modified:
   
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
   branches/db4o/freenet/src/freenet/support/SortedVectorByNumber.java
Log:
Check whether a request's persistence and the persistence of the queue it is in 
are the same.

Modified: 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2008-06-25 15:24:04 UTC (rev 20692)
+++ 
branches/db4o/freenet/src/freenet/client/async/ClientRequestSchedulerCore.java  
    2008-06-25 16:15:41 UTC (rev 20693)
@@ -359,6 +359,10 @@
                        }
                        if(req.persistent())
                                container.activate(req, 1); // FIXME
+                       if(req.persistent() != trackerParent.persistent()) {
+                               Logger.error(this, 
"Request.persistent()="+req.persistent()+" but is in the queue for 
persistent="+trackerParent.persistent());
+                               // FIXME fix it
+                       }
                        if(req.getPriorityClass() != choosenPriorityClass) {
                                // Reinsert it : shouldn't happen if we are 
calling reregisterAll,
                                // maybe we should ask people to report that 
error if seen

Modified: branches/db4o/freenet/src/freenet/support/SortedVectorByNumber.java
===================================================================
--- branches/db4o/freenet/src/freenet/support/SortedVectorByNumber.java 
2008-06-25 15:24:04 UTC (rev 20692)
+++ branches/db4o/freenet/src/freenet/support/SortedVectorByNumber.java 
2008-06-25 16:15:41 UTC (rev 20693)
@@ -128,4 +128,8 @@
                return data[idx].getNumber();
        }

+       public boolean persistent() {
+               return persistent;
+       }
+
 }


Reply via email to