Commit d9a81e87 by Michael Koch Committed by Michael Koch

ServerSocket.java bind (): If InetSocketAddress.getAddress() returns "null" use…

ServerSocket.java bind (): If InetSocketAddress.getAddress() returns "null" use "0.0.0.0" as address to...

2003-12-25  Michael Koch  <konqueror@gmx.de>

	* java/net/ServerSocket.java bind():
	If InetSocketAddress.getAddress() returns "null" use "0.0.0.0" as
	address to bind to.

From-SVN: r75023
parent ac2b3222
2003-12-25 Michael Koch <konqueror@gmx.de>
* java/net/ServerSocket.java bind():
If InetSocketAddress.getAddress() returns "null" use "0.0.0.0" as
address to bind to.
2003-12-23 Guilhem Lavaux <guilhem@kaffe.org>
* java/io/ObjectInputStream.java
......
......@@ -221,14 +221,20 @@ public class ServerSocket
throw new IllegalArgumentException ("Address type not supported");
InetSocketAddress tmp = (InetSocketAddress) endpoint;
SecurityManager s = System.getSecurityManager ();
if (s != null)
s.checkListen (tmp.getPort ());
InetAddress addr = tmp.getAddress();
// Initialize addr with 0.0.0.0.
if (addr == null)
addr = InetAddress.ANY_IF;
try
{
impl.bind (tmp.getAddress (), tmp.getPort ());
impl.bind(addr, tmp.getPort());
impl.listen(backlog);
bound = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment