Author: jflesch
Date: 2007-09-06 15:03:55 +0000 (Thu, 06 Sep 2007)
New Revision: 14986

Modified:
   trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
Log:
FCPClientPut should not notify its observers if the transfers is alread 
finished and that someone calls FCPClientPut.stop()

Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java      2007-09-06 03:35:51 UTC 
(rev 14985)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java      2007-09-06 15:03:55 UTC 
(rev 14986)
@@ -502,6 +502,8 @@

        public boolean stop(final FCPQueueManager queueManager) {
                if(removeRequest()) {
+                       boolean wasFinished = isFinished();
+
                        status = "Stopped";

                        if (!finished)
@@ -511,8 +513,10 @@
                        fatal= true;
                        running = false;

-                       setChanged();
-                       this.notifyObservers();
+                       if (!wasFinished) {
+                               setChanged();
+                               this.notifyObservers();
+                       }

                        return true;
                }


Reply via email to