Author: sleon
Date: 2006-01-07 21:44:03 +0000 (Sat, 07 Jan 2006)
New Revision: 7807

Modified:
   trunk/freenet/src/freenet/node/Node.java
   trunk/freenet/src/freenet/node/Version.java
Log:
added new option to the foramt output

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2006-01-07 20:27:35 UTC (rev 
7806)
+++ trunk/freenet/src/freenet/node/Node.java    2006-01-07 21:44:03 UTC (rev 
7807)
@@ -691,6 +691,7 @@
         fs.put("location", Double.toString(lm.getLocation().getValue()));
         fs.put("version", Version.getVersionString());
         fs.put("testnet", Boolean.toString(testnetEnabled));
+        fs.put("lastGoodVersion", Version.getLastGoodVersionString());
         if(testnetEnabled)
                fs.put("testnetPort", Integer.toString(testnetPort));
         fs.put("myName", myName);

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-01-07 20:27:35 UTC (rev 
7806)
+++ trunk/freenet/src/freenet/node/Version.java 2006-01-07 21:44:03 UTC (rev 
7807)
@@ -20,10 +20,10 @@
        public static final String protocolVersion = "1.0";

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

        /** Oldest build of Fred we will talk to */
-       public static final int lastGoodBuild = 330;
+       public static final int lastGoodBuild = 332;

        /** The highest reported build of fred */
        public static int highestSeenBuild = buildNumber;
@@ -57,6 +57,12 @@
                        { nodeName, nodeVersion, protocolVersion, "" + 
buildNumber };
                return ret;
        }
+       
+       public static final String[] getLastGoodVersion() {
+               String[] ret =
+                       { nodeName, nodeVersion, protocolVersion, "" + 
lastGoodBuild };
+               return ret;
+       }

        /**
         * @return the version string that should be presented in the 
NodeReference
@@ -64,6 +70,13 @@
        public static final String getVersionString() {
                return Fields.commaList(getVersion());
        }
+       
+       /**
+        * @return is needed for the freeviz
+        */
+       public static final String getLastGoodVersionString() {
+               return Fields.commaList(getLastGoodVersion());
+       }

        /**
         * @return true if requests should be accepted from nodes brandishing 
this


Reply via email to