diff src/windows/native/java/net/TwoStacksPlainSocketImpl.c @ 6685:95eeca6dc691

8015743: Address internet addresses Summary: moved Inet6Address fields to holder class Reviewed-by: chegar, alanb, skoivu, khazra
author michaelm
date Wed, 03 Jul 2013 17:54:38 +0100
parents 8dd8266a2f4b
children 13473046fdfe
line wrap: on
line diff
--- a/src/windows/native/java/net/TwoStacksPlainSocketImpl.c	Tue Jul 02 15:17:25 2013 -0700
+++ b/src/windows/native/java/net/TwoStacksPlainSocketImpl.c	Wed Jul 03 17:54:38 2013 +0100
@@ -728,7 +728,6 @@
         setInetAddress_family(env, socketAddressObj, IPv4);
         (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj);
     } else {
-        jbyteArray addr;
         /* AF_INET6 -> Inet6Address */
         if (inet6Cls == 0) {
             jclass c = (*env)->FindClass(env, "java/net/Inet6Address");
@@ -751,10 +750,10 @@
             NET_SocketClose(fd);
             return;
         }
-        addr = (*env)->GetObjectField (env, socketAddressObj, ia6_ipaddressID);
-        (*env)->SetByteArrayRegion (env, addr, 0, 16, (const char *)&him.him6.sin6_addr);
+        setInet6Address_ipaddress(env, socketAddressObj, (const char *)&him.him6.sin6_addr);
+
         setInetAddress_family(env, socketAddressObj, IPv6);
-        (*env)->SetIntField(env, socketAddressObj, ia6_scopeidID, him.him6.sin6_scope_id);
+        setInet6Address_scopeid(env, socketAddressObj, him.him6.sin6_scope_id);
     }
     /* fields common to AF_INET and AF_INET6 */