version 0.4.6: improved handling of closed connections; fix bug in node-hostname... 0.4.6
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 29 Apr 2006 23:18:18 +0000 (23:18 +0000)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 29 Apr 2006 23:18:18 +0000 (23:18 +0000)
src/de/todesbaum/jsite/application/ProjectInserter.java
src/de/todesbaum/jsite/gui/NodeManagerPage.java
src/de/todesbaum/jsite/main/Version.java
src/de/todesbaum/util/freenet/fcp2/Connection.java

index 03072f8..d525ddb 100644 (file)
@@ -48,7 +48,7 @@ import de.todesbaum.util.io.StreamCopier;
 
 /**
  * @author David Roden &lt;droden@gmail.com&gt;
- * @version $Id: ProjectInserter.java 440 2006-03-30 09:31:25Z bombe $
+ * @version $Id: ProjectInserter.java 486 2006-04-27 10:58:34Z bombe $
  */
 public class ProjectInserter implements FileScannerListener, Runnable {
 
@@ -240,12 +240,19 @@ public class ProjectInserter implements FileScannerListener, Runnable {
 
                /* create connection to node */
                Connection connection = freenetInterface.getConnection("project-insert-" + counter++);
+               boolean connected = false;
+               Throwable cause = null;
                try {
-                       connection.connect();
+                       connected = connection.connect();
                } catch (IOException e1) {
-                       fireProjectInsertFinished(false, e1);
+                       cause = e1;
+               }
+               
+               if (!connected) {
+                       fireProjectInsertFinished(false, cause);
                        return;
                }
+               
                Client client = new Client(connection);
 
                /* create containers */
index 9b1c80a..1309fbf 100644 (file)
@@ -212,6 +212,7 @@ public class NodeManagerPage extends TWizardPage implements ListSelectionListene
                } else if ("node-hostname".equals(documentName)) {
                        node.setHostname(documentText);
                        nodeList.repaint();
+                       fireNodesUpdated(getNodes());
                }
        }
 
index 98829d2..47f7ebc 100644 (file)
@@ -25,7 +25,7 @@ package de.todesbaum.jsite.main;
  */
 public class Version {
 
-       private static final String VERSION = "0.4.5";
+       private static final String VERSION = "0.4.6";
 
        public static final String getVersion() {
                return VERSION;
index 15757d0..1eeded0 100644 (file)
@@ -231,6 +231,9 @@ public class Connection {
                        }
                        nodeSocket = null;
                }
+               synchronized (this) {
+                       notify();
+               }
                fireConnectionTerminated();
        }