natPlainSocketImplPosix.cc (create): Return if already created.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=233406 * gnu/java/net/natPlainSocketImplPosix.cc (create): Return if already created. * gnu/java/net/PlainSocketImpl.java (getLocalAddress): Handle case where localport is -1. (create): Now public. * gnu/java/nio/SocketChannelImpl.java (SocketChannelImpl): Call 'create' on the socket. From-SVN: r123440
This commit is contained in:
@@ -228,7 +228,9 @@ public final class PlainSocketImpl extends SocketImpl
|
||||
*
|
||||
* @param stream true for a stream socket, false for a datagram socket
|
||||
*/
|
||||
protected native void create(boolean stream) throws IOException;
|
||||
// FIXME: this is public for nio ... but this is just a hack
|
||||
// until we upgrade to Classpath's nio.
|
||||
public native void create(boolean stream) throws IOException;
|
||||
|
||||
/**
|
||||
* Connects to the remote hostname and port specified as arguments.
|
||||
@@ -336,7 +338,7 @@ public final class PlainSocketImpl extends SocketImpl
|
||||
{
|
||||
localSocketAddress
|
||||
= new InetSocketAddress ((InetAddress) getOption(SocketOptions.SO_BINDADDR),
|
||||
localport);
|
||||
localport == -1 ? 0 : localport);
|
||||
}
|
||||
catch (SocketException _)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user