Author: jflesch
Date: 2006-07-22 04:00:27 +0000 (Sat, 22 Jul 2006)
New Revision: 9711
Modified:
trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java
Log:
Hopefully, 'Filename == null' bug should be fixed
Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java 2006-07-22 03:33:18 UTC
(rev 9710)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java 2006-07-22 04:00:27 UTC
(rev 9711)
@@ -67,6 +67,7 @@
String privateKey, int priority,
boolean global, int persistence) {
this.localFile = file;
+ this.name = file.getName();
fileSize = file.length();
this.keyType = keyType;
Modified: trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java
===================================================================
--- trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java 2006-07-22 03:33:18 UTC
(rev 9710)
+++ trunk/apps/Thaw/src/thaw/fcp/FCPConnection.java 2006-07-22 04:00:27 UTC
(rev 9711)
@@ -259,7 +259,10 @@
public boolean isWriting() {
- return ( isConnected() && ( isWritingLocked() ||
((System.currentTimeMillis() - lastWrite) < 300) ) );
+ if( !isConnected() )
+ return false;
+
+ return ( isWritingLocked() || ((System.currentTimeMillis() -
lastWrite) < 300) );
}
public boolean write(String toWrite) {
@@ -414,10 +417,11 @@
} catch (java.io.IOException e) {
if(isConnected()) {
Logger.error(this, "IOException while
reading but still connected, wtf? : "+e.toString());
- disconnect();
} else
Logger.notice(this, "IOException.
Disconnected.");
+ disconnect();
+
return null;
}
} else {