[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: small fix for IPv6 InetAddress

Kaffe CVS cvs-commits at kaffe.org
Wed Nov 24 21:38:20 PST 2004


PatchSet 5484 
Date: 2004/11/25 04:30:16
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: small fix for IPv6 InetAddress

2004-11-24  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/java/net/InetAddress.java:
        Resynced with GNU Classpath.

        2004-11-17  Michael Koch  <konqueror at gmx.de>

        * java/net/InetAddress.java (getCanonicalHostName):
        Support IPv6 addresses.

Members: 
	libraries/javalib/java/net/InetAddress.java:1.26->1.27 
	ChangeLog:1.3030->1.3031 

Index: kaffe/libraries/javalib/java/net/InetAddress.java
diff -u kaffe/libraries/javalib/java/net/InetAddress.java:1.26 kaffe/libraries/javalib/java/net/InetAddress.java:1.27
--- kaffe/libraries/javalib/java/net/InetAddress.java:1.26	Mon Oct 25 19:27:45 2004
+++ kaffe/libraries/javalib/java/net/InetAddress.java	Thu Nov 25 04:30:16 2004
@@ -438,8 +438,14 @@
       }
 
     // Try to find the FDQN now
-    // FIXME: This does not work with IPv6.
-    InetAddress address = new Inet4Address(getAddress(), null);
+    InetAddress address;
+    byte[] ipaddr = getAddress();
+
+    if (ipaddr.length == 16)
+      address = new Inet6Address(getAddress(), null);
+    else
+      address = new Inet4Address(getAddress(), null);
+
     return address.getHostName();
   }
 
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3030 kaffe/ChangeLog:1.3031
--- kaffe/ChangeLog:1.3030	Thu Nov 25 04:15:45 2004
+++ kaffe/ChangeLog	Thu Nov 25 04:30:10 2004
@@ -1,5 +1,15 @@
 2004-11-24  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/java/net/InetAddress.java:
+        Resynced with GNU Classpath.
+
+	2004-11-17  Michael Koch  <konqueror at gmx.de>
+
+        * java/net/InetAddress.java (getCanonicalHostName):
+        Support IPv6 addresses.
+
+2004-11-24  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/awt/geom/Arc2D.java:
         Resynced with GNU Classpath.
 




More information about the kaffe mailing list