Author: jflesch
Date: 2006-07-10 23:51:46 +0000 (Mon, 10 Jul 2006)
New Revision: 9554

Modified:
   trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java
   trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java
   trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java
Log:
Fixing status display when a transfer is cancelled

Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java      2006-07-10 23:35:54 UTC 
(rev 9553)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java      2006-07-10 23:51:46 UTC 
(rev 9554)
@@ -383,8 +383,16 @@
        public boolean stop(FCPQueueManager queryManager) {
                Logger.info(this, "Stop fetching of the key : "+getFileKey());

+               progress = 100;
+               successful = false;
+               status = "Stopped";
+
                if(!isRunning() || isFinished()) {
-                       Logger.notice(this, "Can't stop. Not running");
+                       Logger.info(this, "Can't stop. Not running -> 
considered as failed");
+
+                       setChanged();
+                       notifyObservers();
+
                        return true;
                }

@@ -395,6 +403,9 @@
                        return false;
                }

+               setChanged();
+               notifyObservers();
+               
                return true;
        }


Modified: trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java     2006-07-10 23:35:54 UTC 
(rev 9553)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java     2006-07-10 23:51:46 UTC 
(rev 9554)
@@ -33,10 +33,10 @@

        private boolean lockWriting = false;

-       /** If == 1, then will print on stdout
+       /** If == true, then will print on stdout
         * all fcp input / output.
         */
-       private final static int DEBUG_MODE = 1;
+       private final static boolean DEBUG_MODE = true;

        /**
         * Don't connect. Call connect() for that.
@@ -44,7 +44,7 @@
        public FCPConnection(String nodeAddress,
                             int port)
        {
-               if(DEBUG_MODE == 1) {
+               if(DEBUG_MODE) {
                        Logger.notice(this, "DEBUG_MODE ACTIVATED");
                }

@@ -268,11 +268,13 @@

                                }

+                               if(DEBUG_MODE) {
+                                       if(result.matches("[- 
\\?.a-zA-Z0-9,~%@/_=\\[\\]\\(\\)]*"))
+                                               Logger.asIt(this, "Thaw <<< 
Node : "+result);
+                                       else
+                                               Logger.asIt(this, "Thaw <<< 
Node : Unknow chars in message. Not displayed");
+                               }

-                               if(result.matches("[- \\?.a-zA-Z0-9,~%@/_=]*")) 
                        
-                                       Logger.asIt(this, "Thaw <<< Node : 
"+result);
-                               else
-                                       Logger.error(this, "PROBABLE RAW 
MESSAGE. ABNORMAL.");

                                return result;


Modified: trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java       
2006-07-10 23:35:54 UTC (rev 9553)
+++ trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java       
2006-07-10 23:51:46 UTC (rev 9554)
@@ -231,8 +231,7 @@
                                }

                                if(e.getSource() == cancelItem) {
-                                       if(query.isRunning() && 
!query.isFinished())
-                                               
query.stop(core.getQueueManager());
+                                       query.stop(core.getQueueManager());
                                }

                                if(e.getSource() == delayItem) {


Reply via email to