Author: toad
Date: 2006-06-12 17:11:54 +0000 (Mon, 12 Jun 2006)
New Revision: 9172

Modified:
   trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java
   trunk/freenet/src/freenet/node/Version.java
Log:
809: Another doh. Should prevent corruption of peers file now anyway.

Modified: trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java   2006-06-12 
17:06:16 UTC (rev 9171)
+++ trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java   2006-06-12 
17:11:54 UTC (rev 9172)
@@ -55,6 +55,7 @@

        public FreenetInetAddress(String host, boolean allowUnknown) throws 
UnknownHostException {
         InetAddress addr = null;
+        if(host != null && host.startsWith("/")) host = host.substring(1);
         // if we were created with an explicit IP address, use it as such
         // debugging log messages because AddressIdentifier doesn't appear to 
handle all IPv6 literals correctly, such as "fe80::204:1234:dead:beef"
         AddressIdentifier.AddressType addressType = 
AddressIdentifier.getAddressType(host);
@@ -223,7 +224,7 @@
                if(hostname != null) {
                        return hostname;
                } else {
-                       return _address.toString();
+                       return _address.getHostAddress();
                }
        }


Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-06-12 17:06:16 UTC (rev 
9171)
+++ trunk/freenet/src/freenet/node/Version.java 2006-06-12 17:11:54 UTC (rev 
9172)
@@ -18,7 +18,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 808;
+       private static final int buildNumber = 809;

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


Reply via email to