2003-11-30 Jeff Sturm <jsturm@one-point.com>

* java/net/InetAddress.java:
	(static): Don'f force DNS request for ANY_IF address.

2003-11-30  Michael Koch  <konqueror@gmx.de>

	* java/net/InetAddress.java,
	java/net/natInetAddressNoNet.cc,
	java/net/natInetAddressPosix.cc,
	java/net/natInetAddressWin32.cc:
	Reverted my last patch.

From-SVN: r74074
This commit is contained in:
Michael Koch
2003-11-30 21:02:56 +00:00
parent b97366d9b3
commit d7f16c2b3b
5 changed files with 21 additions and 25 deletions

View File

@@ -82,7 +82,7 @@ public class InetAddress implements Serializable
}
byte[] zeros = { 0, 0, 0, 0 };
ANY_IF = new InetAddress (zeros, null);
ANY_IF = new InetAddress (zeros, "0.0.0.0");
}
/**
@@ -564,23 +564,8 @@ public class InetAddress implements Serializable
*/
private static native byte[] aton (String host);
private static native InetAddress[] implLookup(String hostname,
InetAddress addr,
boolean all);
private static InetAddress[] lookup (String hostname,
InetAddress addr, boolean all)
{
if (addr.equals(ANY_IF))
{
byte[] zeros = { 0, 0, 0, 0 };
InetAddress[] result = new InetAddress[1];
result[0] = new InetAddress(zeros, "0.0.0.0");
return result;
}
return implLookup(hostname, addr, all);
}
private static native InetAddress[] lookup (String hostname,
InetAddress addr, boolean all);
private static native int getFamily (byte[] address);