Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.1710 diff -u -b -B -r1.1710 ChangeLog --- ChangeLog 26 Dec 2003 20:36:22 -0000 1.1710 +++ ChangeLog 26 Dec 2003 22:20:45 -0000 @@ -1,5 +1,14 @@ 2003-12-26 Michael Koch + * java/net/DatagramSocket.java + (close): Directly return if socket is closed. + * java/net/ServerSocket.java bind(): + If InetSocketAddress.getAddress() returns "null" use "0.0.0.0" as + address to bind to. + (close): Directly return if socket is closed. + +2003-12-26 Michael Koch + * java/util/TimeZone.java (getOffset): New method. 2003-12-26 Michael Koch Index: java/net/DatagramSocket.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/DatagramSocket.java,v retrieving revision 1.36 diff -u -b -B -r1.36 DatagramSocket.java --- java/net/DatagramSocket.java 2 Dec 2003 15:42:34 -0000 1.36 +++ java/net/DatagramSocket.java 26 Dec 2003 22:20:45 -0000 @@ -216,8 +216,9 @@ */ public void close() { - if (!isClosed()) - { + if (isClosed()) + return; + try { getImpl().close(); @@ -241,7 +242,6 @@ catch (IOException e) { // Do nothing. - } } } Index: java/net/ServerSocket.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/ServerSocket.java,v retrieving revision 1.30 diff -u -b -B -r1.30 ServerSocket.java --- java/net/ServerSocket.java 2 Dec 2003 11:24:05 -0000 1.30 +++ java/net/ServerSocket.java 26 Dec 2003 22:20:45 -0000 @@ -226,9 +226,15 @@ 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; } @@ -353,15 +359,15 @@ */ public void close () throws IOException { - if (!isClosed()) - { + if (isClosed()) + return; + impl.close(); impl = null; bound = false; if (getChannel() != null) getChannel().close(); - } } /**