Author: toad
Date: 2006-01-31 02:08:01 +0000 (Tue, 31 Jan 2006)
New Revision: 7967
Modified:
trunk/freenet/src/freenet/io/comm/Peer.java
trunk/freenet/src/freenet/node/Version.java
Log:
418:
d'oh. Didn't work for pure IP addresses.
Modified: trunk/freenet/src/freenet/io/comm/Peer.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/Peer.java 2006-01-31 01:47:58 UTC (rev
7966)
+++ trunk/freenet/src/freenet/io/comm/Peer.java 2006-01-31 02:08:01 UTC (rev
7967)
@@ -125,6 +125,10 @@
*/
public static String getHostName(InetAddress primaryIPAddress) {
String s = primaryIPAddress.toString();
- return s.substring(0, s.indexOf('/')).trim();
+ String addr = s.substring(0, s.indexOf('/')).trim();
+ if(addr.length() == 0)
+ return primaryIPAddress.getHostAddress();
+ else
+ return addr;
}
}
\ No newline at end of file
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-01-31 01:47:58 UTC (rev
7966)
+++ trunk/freenet/src/freenet/node/Version.java 2006-01-31 02:08:01 UTC (rev
7967)
@@ -20,7 +20,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 417;
+ private static final int buildNumber = 418;
/** Oldest build of Fred we will talk to */
private static final int lastGoodBuild = 403;