Update of /cvsroot/freenet/Freenet0.7Rewrite/src/freenet/node
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13313/src/freenet/node

Modified Files:
        Version.java TextModeClientInterface.java 
Log Message:
Minor improvement

Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/Freenet0.7Rewrite/src/freenet/node/Version.java,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -w -r1.127 -r1.128
--- Version.java        7 Sep 2005 18:19:01 -0000       1.127
+++ Version.java        7 Sep 2005 18:27:41 -0000       1.128
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       public static final int buildNumber = 132;
+       public static final int buildNumber = 133;

        /** Oldest build of Fred we will talk to */
        public static final int lastGoodBuild = 131;

Index: TextModeClientInterface.java
===================================================================
RCS file: 
/cvsroot/freenet/Freenet0.7Rewrite/src/freenet/node/TextModeClientInterface.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -r1.19 -r1.20
--- TextModeClientInterface.java        7 Sep 2005 18:19:01 -0000       1.19
+++ TextModeClientInterface.java        7 Sep 2005 18:27:41 -0000       1.20
@@ -55,7 +55,7 @@
         System.out.println("PUTFILE:<filename> - put a file from disk.");
         System.out.println("GETFILE:<filename> - fetch a key and put it in a 
file. If the key includes a filename we will use it but we will not overwrite 
local files.");
         System.out.println("CONNECT:<filename> - connect to a node from its 
ref in a file.");
-        System.out.println("CONNECT:\n<text, until a . on a line by itself> - 
enter a noderef directly.");
+        System.out.println("CONNECT:\n<noderef including an End on a line by 
itself> - enter a noderef directly.");
         System.out.println("NAME:<new node name> - change the node's name.");
         System.out.println("STATUS - display some status information on the 
node including its reference and connections.");
         System.out.println("QUIT - exit the program");
@@ -282,6 +282,7 @@
             } else {
                 String content = readLines(reader, true);
                 if(content == null) return;
+                if(content.equals("")) return;
                 connect(content);
             }
         } else if(line.startsWith("NAME:")) {
@@ -315,7 +316,7 @@
                 System.err.println("Bye... ("+e1+")");
                 return null;
             }
-            if(line.equals(".")) break;
+            if((!isFieldSet) && line.equals(".")) break;
             if(isFieldSet) {
                 // Mangling
                 // First trim
@@ -331,7 +332,7 @@
                         int idx = line.indexOf('=');
                         if(idx < 0) {
                             System.err.println("No = and no End in line: 
"+line);
-                            breakflag = true;
+                            return "";
                         } else {
                             if(idx > 0) {
                                 String after;
@@ -352,8 +353,8 @@
                                     }
                                 }
                                 before = before.substring(x);
-                                line = before + '=' + line.substring(idx+1);
-                                System.out.println(line);
+                                line = before + '=' + after;
+                                //System.out.println(line);
                             } else {
                                 System.err.println("Invalid empty field name");
                                 breakflag = true;
@@ -373,6 +374,7 @@
      */
     private void connect(String content) {
         SimpleFieldSet fs;
+        System.out.println("Connecting to:\n"+content);
         try {
             fs = new SimpleFieldSet(content);
         } catch (IOException e) {


Reply via email to