InetAddress.java: Mostly merged with Classpath.
2006-09-20 Gary Benson <gbenson@redhat.com> * java/net/InetAddress.java: Mostly merged with Classpath. * java/net/VMInetAddress.java: New file. * sources.am, Makefile.in: Rebuilt. * java/net/natVMNetworkInterfacePosix.cc (getInterfaces): Create InetAddress objects using InetAddress.getByAddress. * gnu/java/net/natPlainSocketImplPosix.cc (accept, getOption): Likewise. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (peekData, receive, getLocalAddress): Likewise. From-SVN: r117075
This commit is contained in:
@@ -290,7 +290,7 @@ gnu::java::net::PlainDatagramSocketImpl::peekData (::java::net::DatagramPacket *
|
||||
else
|
||||
throw new ::java::net::SocketException (JvNewStringUTF ("invalid family"));
|
||||
|
||||
p->setAddress (new ::java::net::InetAddress (raddr, NULL));
|
||||
p->setAddress (::java::net::InetAddress::getByAddress (raddr));
|
||||
p->setPort (rport);
|
||||
p->length = (int) retlen;
|
||||
return rport;
|
||||
@@ -430,7 +430,7 @@ gnu::java::net::PlainDatagramSocketImpl::receive (::java::net::DatagramPacket *p
|
||||
else
|
||||
throw new ::java::net::SocketException (JvNewStringUTF ("invalid family"));
|
||||
|
||||
p->setAddress (new ::java::net::InetAddress (raddr, NULL));
|
||||
p->setAddress (::java::net::InetAddress::getByAddress (raddr));
|
||||
p->setPort (rport);
|
||||
p->length = (jint) retlen;
|
||||
return;
|
||||
@@ -564,7 +564,7 @@ getLocalAddress (int native_fd)
|
||||
else
|
||||
throw new ::java::net::SocketException (JvNewStringUTF ("invalid family"));
|
||||
|
||||
return new ::java::net::InetAddress (laddr, NULL);
|
||||
return ::java::net::InetAddress::getByAddress (laddr);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -308,7 +308,7 @@ gnu::java::net::PlainSocketImpl::accept (gnu::java::net::PlainSocketImpl *s)
|
||||
|
||||
s->native_fd = new_socket;
|
||||
s->localport = localport;
|
||||
s->address = new ::java::net::InetAddress (raddr, NULL);
|
||||
s->address = ::java::net::InetAddress::getByAddress (raddr);
|
||||
s->port = rport;
|
||||
return;
|
||||
|
||||
@@ -808,7 +808,7 @@ gnu::java::net::PlainSocketImpl::getOption (jint optID)
|
||||
else
|
||||
throw new ::java::net::SocketException
|
||||
(JvNewStringUTF ("invalid family"));
|
||||
localAddress = new ::java::net::InetAddress (laddr, NULL);
|
||||
localAddress = ::java::net::InetAddress::getByAddress (laddr);
|
||||
}
|
||||
|
||||
return localAddress;
|
||||
|
||||
Reference in New Issue
Block a user