Author: toad
Date: 2009-04-03 14:29:56 +0000 (Fri, 03 Apr 2009)
New Revision: 26443

Modified:
   trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java
Log:
Revert


Modified: trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java
===================================================================
--- trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java 
2009-04-03 14:29:18 UTC (rev 26442)
+++ trunk/freenet/src/freenet/client/async/PersistentChosenRequest.java 
2009-04-03 14:29:56 UTC (rev 26443)
@@ -147,39 +147,31 @@
                        container.activate(request, 1);
                Logger.normal(this, "Finishing "+this+" for "+request);
                // Call all the callbacks.
-               PersistentChosenBlock[] finishedBlocks = null;
+               PersistentChosenBlock[] finishedBlocks;
                int startedSize;
-               boolean returnNow = false;
                synchronized(this) {
                        if(finished) {
                                if(blocksFinished.isEmpty()) {
                                        // Okay...
                                        if(!alreadyActive)
                                                container.deactivate(request, 
1);
-                                       returnNow = true;
+                                       return;
                                } else {
                                        Logger.error(this, "Finished but 
blocksFinished not empty on "+this, new Exception("debug"));
                                        // Process the blocks...
                                }
                        }
-                       if(!returnNow) {
                        startedSize = blocksStarted.size();
                        if(startedSize > 0) {
                                Logger.error(this, "Still waiting for callbacks 
on "+this+" for "+startedSize+" blocks");
                                // Wait... if we set finished, we have to 
process them now, and
                                // we can't process them now because we haven't 
had the callbacks,
                                // we don't know what the outcome will be.
-                               returnNow = true;
-                       } else {
+                               return;
+                       }
                        finished = true;
                        finishedBlocks = blocksFinished.toArray(new 
PersistentChosenBlock[blocksFinished.size()]);
-                       }
-                       }
                }
-               if(returnNow) {
-                       if(finished) scheduler.removeRunningRequest(request);
-                       return;
-               }
                if(finishedBlocks.length == 0) {
                        if(!dumping)
                                Logger.error(this, "No finished blocks in 
finish() on "+this);

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

Reply via email to