This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: Fix InetAddress.getByName and loopback issues



I commited the patch below after successful bootstrap on darwin. And after talking with Tom Tromey.

Andreas

2004-08-14 Andreas Tobler <a.tobler@schweiz.ch>

    * java/net/natInetAddressPosix.cc (lookup): Reflect rename of
    localhostAddress to loopbackAddress.
    * java/net/natInetAddressWin32.cc (lookup): Likewise.


------------------------------------------------------------------------


Index: java/net/natInetAddressWin32.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natInetAddressWin32.cc,v
retrieving revision 1.6
diff -u -r1.6 natInetAddressWin32.cc
--- java/net/natInetAddressWin32.cc 30 Nov 2003 21:02:56 -0000 1.6
+++ java/net/natInetAddressWin32.cc 14 Aug 2004 02:37:36 -0000
@@ -60,7 +60,7 @@
// FIXME: this is insufficient if some other piece of code calls
// this gethostbyname.
- JvSynchronize sync (java::net::InetAddress::localhostAddress);
+ JvSynchronize sync (java::net::InetAddress::loopbackAddress);
hptr = gethostbyname (hostname);
}
else
@@ -87,7 +87,7 @@
// FIXME: this is insufficient if some other piece of code calls
// this gethostbyaddr.
- JvSynchronize sync (java::net::InetAddress::localhostAddress);
+ JvSynchronize sync (java::net::InetAddress::loopbackAddress);
hptr = gethostbyaddr (val, len, type);
}
if (hptr != NULL)
Index: java/net/natInetAddressPosix.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natInetAddressPosix.cc,v
retrieving revision 1.4
diff -u -r1.4 natInetAddressPosix.cc
--- java/net/natInetAddressPosix.cc 13 Aug 2004 22:17:34 -0000 1.4
+++ java/net/natInetAddressPosix.cc 14 Aug 2004 02:37:36 -0000
@@ -167,7 +167,7 @@
#else
// FIXME: this is insufficient if some other piece of code calls
// this gethostbyname.
- JvSynchronize sync (java::net::InetAddress::localhostAddress);
+ JvSynchronize sync (java::net::InetAddress::loopbackAddress);
hptr = gethostbyname (hostname);
#endif /* HAVE_GETHOSTBYNAME_R */
}
@@ -221,7 +221,7 @@
#else /* HAVE_GETHOSTBYADDR_R */
// FIXME: this is insufficient if some other piece of code calls
// this gethostbyaddr.
- JvSynchronize sync (java::net::InetAddress::localhostAddress);
+ JvSynchronize sync (java::net::InetAddress::loopbackAddress);
hptr = gethostbyaddr (val, len, type);
#endif /* HAVE_GETHOSTBYADDR_R */
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]