Author: toad
Date: 2008-05-01 19:38:01 +0000 (Thu, 01 May 2008)
New Revision: 19660

Modified:
   trunk/freenet/src/freenet/client/async/USKFetcher.java
Log:
Fix 0000793: Dupe detection on USK inserts breaking?

Modified: trunk/freenet/src/freenet/client/async/USKFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKFetcher.java      2008-05-01 
19:14:20 UTC (rev 19659)
+++ trunk/freenet/src/freenet/client/async/USKFetcher.java      2008-05-01 
19:38:01 UTC (rev 19660)
@@ -468,6 +468,8 @@
                        for(int i=0;i<attempts.length;i++) {
                                // Race conditions happen here and waste a lot 
more time than this simple check.
                                long lastEd = uskManager.lookup(origUSK);
+                               if(keepLastData && lastEd == lookedUp)
+                                       lastEd--; // If we want the data, then 
get it for the known edition, so we always get the data, so USKInserter can 
compare it and return the old edition if it is identical.
                                if(attempts[i].number > lastEd)
                                        attempts[i].schedule();
                                else {


Reply via email to