But WSASendDisconnect isn't deprecated, right? So you wanted to get rid of it? 
I still don't see the reason...

-----Original Message-----
From: gary.ad...@oracle.com [mailto:gary.ad...@oracle.com] 
Sent: Donnerstag, 1. Februar 2018 12:17
To: Langer, Christoph <christoph.lan...@sap.com>; OpenJDK Serviceability 
<serviceability-...@openjdk.java.net>; OpenJDK Build 
<build-...@openjdk.java.net>; OpenJDK Networking <net-dev@openjdk.java.net>
Subject: Re: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 
'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

First pass over the code I disabled the compilation flag and then
did quick substitution for the easier functions. I commented out the
WSASendDisconnect calls so I could see what tests would fail if
the function was just removed. I have a replacement now that uses
"shutdown(fd,SD_SEND)", but I still have a few more test failures to
investigate.

I updated the error message text for "getaddrinfo".

I'll post a revised webrev after the 4 jshell errors are corrected.


On 2/1/18 3:11 AM, Langer, Christoph wrote:
> Hi Gary,
>
> I was having a look at your changes.
>
> I'm wondering what the reason is behind uncommenting WSASendDisconnect in 
> Java_sun_nio_ch_SocketDispatcher_preClose0 of file SocketDispatcher.c? And in 
> dbgsysSocketClose?
>
> In socketTransport.c, line:
>      331                 setLastError(0, "gethostbyname: unknown host");
> you should change the description text of the error to getaddrinfo instead of 
> gethostbyname.
>
> Best regards
> Christoph
>
>
>
> -----Original Message-----
> From: build-dev [mailto:build-dev-boun...@openjdk.java.net] On Behalf Of Gary 
> Adams
> Sent: Donnerstag, 25. Januar 2018 19:47
> To: OpenJDK Serviceability <serviceability-...@openjdk.java.net>; OpenJDK 
> Build <build-...@openjdk.java.net>; OpenJDK Networking 
> <net-dev@openjdk.java.net>
> Subject: RFR: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 
> 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()
>
> Here's a first pass attempt to remove the -D_WINSOCK_DEPRECATED_NO_WARNINGS
> build flag and update the winsock deprecated functions.
>
>     Issue: https://bugs.openjdk.java.net/browse/JDK-8080990
>     Webrev: http://cr.openjdk.java.net/~gadams/8080990/
>
> These are the initial deprecated functions updated:
>      gethostbyname -> getaddrinfo
>      inet_addr -> inet_pton
>      inet_ntoa -> inet_ntop
>
> I'm not sure how to replace the existing WSASendDisconnect calls.
> It's not clear that it actually provides a graceful disconnect.
>
>

Reply via email to