Author: jflesch
Date: 2006-07-19 23:28:58 +0000 (Wed, 19 Jul 2006)
New Revision: 9666
Modified:
trunk/apps/Thaw/src/thaw/core/Logger.java
trunk/apps/Thaw/src/thaw/core/QueueKeeper.java
trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java
trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
trunk/apps/Thaw/src/thaw/fcp/FCPQueueManager.java
trunk/apps/Thaw/src/thaw/plugins/insertPlugin/InsertPanel.java
trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java
Log:
Fix ordonnancor
Modified: trunk/apps/Thaw/src/thaw/core/Logger.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/Logger.java 2006-07-19 21:54:07 UTC (rev
9665)
+++ trunk/apps/Thaw/src/thaw/core/Logger.java 2006-07-19 23:28:58 UTC (rev
9666)
@@ -21,7 +21,7 @@
* 2 or more is recommanded.
* 5 is never logged in a file, only on stdout.
*/
- private final static int LOG_LEVEL = 5;
+ private final static int LOG_LEVEL = 2;
private static Vector logListeners = null;
Modified: trunk/apps/Thaw/src/thaw/core/QueueKeeper.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/QueueKeeper.java 2006-07-19 21:54:07 UTC
(rev 9665)
+++ trunk/apps/Thaw/src/thaw/core/QueueKeeper.java 2006-07-19 23:28:58 UTC
(rev 9666)
@@ -90,7 +90,7 @@
File file = new File(fileName);
if(!file.exists() || !file.canRead()) {
- Logger.notice(new QueueKeeper(), "Unable to find
previous queue state file '"+file.getPath()+"'");
+ Logger.info(new QueueKeeper(), "Unable to find previous
queue state file '"+file.getPath()+"' => Not reloaded from file.");
return false;
}
Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java 2006-07-19 21:54:07 UTC
(rev 9665)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java 2006-07-19 23:28:58 UTC
(rev 9666)
@@ -335,6 +335,7 @@
fileSize = message.getAmountOfDataWaiting();
status = "Writing to disk";
+ Logger.notice(this, "Receiving file ...");
setChanged();
notifyObservers();
@@ -347,6 +348,8 @@
Logger.warning(this, "Unable to fetch correctly
the file. This may create problems on socket");
}
+ Logger.notice(this, "Done");
+
queueManager.getQueryManager().getConnection().unlockReading();
queueManager.getQueryManager().getConnection().unlockWriting();
@@ -458,6 +461,8 @@
}
public synchronized boolean continueSaveFileTo(String dir) {
+ Logger.notice(this, "Asking file to the node...");
+
destinationDir = dir;
status = "Requesting file";
Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java 2006-07-19 21:54:07 UTC
(rev 9665)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java 2006-07-19 23:28:58 UTC
(rev 9666)
@@ -121,10 +121,12 @@
this.publicKey = publicKey;
if(srcFile != null) {
- String[] plop = srcFile.split(File.separator);
+ String[] plop =
srcFile.split(File.separator.replaceAll("\\\\", "\\\\\\\\"));
this.name = plop[plop.length-1];
} else {
- String[] plop = publicKey.split(File.separator);
+ /* <Jflesch> Bill Gates: God kills a kitten each time
you use a '\' !! */
+
+ String[] plop =
publicKey.split(File.separator.replaceAll("\\\\", "\\\\\\\\"));
this.name = plop[plop.length-1];
if(keyType != 0) {
Modified: trunk/apps/Thaw/src/thaw/fcp/FCPQueueManager.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPQueueManager.java 2006-07-19 21:54:07 UTC
(rev 9665)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPQueueManager.java 2006-07-19 23:28:58 UTC
(rev 9666)
@@ -358,7 +358,15 @@
if(stopThread)
return;
- ordonnance();
+ try {
+ ordonnance();
+ } catch(java.util.ConcurrentModificationException e) {
+ Logger.notice(this, "Ordonnancor: Collision !");
+ } catch(Exception e) {
+ Logger.error(this, "EXCEPTION FROM ORDONNANCOR
: "+e.toString());
+ Logger.error(this, "ERROR : "+e.getMessage());
+ e.printStackTrace();
+ }
}
}
Modified: trunk/apps/Thaw/src/thaw/plugins/insertPlugin/InsertPanel.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/insertPlugin/InsertPanel.java
2006-07-19 21:54:07 UTC (rev 9665)
+++ trunk/apps/Thaw/src/thaw/plugins/insertPlugin/InsertPanel.java
2006-07-19 23:28:58 UTC (rev 9666)
@@ -329,7 +329,7 @@
if(selectedFiles.getText() == null)
return "";
- String[] cutcut = selectedFiles.getText().split(File.separator);
+ String[] cutcut =
selectedFiles.getText().split(File.separator.replaceAll("\\", "\\\\"));
return cutcut[cutcut.length - 1];
}
Modified: trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java
2006-07-19 21:54:07 UTC (rev 9665)
+++ trunk/apps/Thaw/src/thaw/plugins/queueWatcher/QueuePanel.java
2006-07-19 23:28:58 UTC (rev 9666)
@@ -65,7 +65,6 @@
private boolean insertionQueue = false;
-
public QueuePanel(Core core, DetailPanel detailPanel, boolean
isForInsertionQueue) {
insertionQueue = isForInsertionQueue;
@@ -161,9 +160,13 @@
boolean
isSelected, boolean hasFocus,
int row, int
column) {
+ if(value == null)
+ return null;
+
if( (insertionQueue && column == 3)
|| (!insertionQueue && column == 4) ) {
+
Integer progress = (Integer)value;
JProgressBar bar = new JProgressBar(0, 100);
@@ -217,7 +220,6 @@
}
-
public void addToTable(FCPTransferQuery query) {
if( (insertionQueue && query.getQueryType() == 2)
|| (!insertionQueue && query.getQueryType() == 1)) {