From 01380b0554f685d85bf0dca6363cd55003ba482d Mon Sep 17 00:00:00 2001 From: "Kirill K. Smirnov" Date: Mon, 17 Dec 2007 17:40:02 +0300 Subject: [PATCH] ws2_32: Fix flags conversion in getnameinfo() function. --- dlls/ws2_32/socket.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 3abb5a06693..12024f52dfb 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -327,6 +327,15 @@ static const int ws_aiflag_map[][2] = */ }; +static const int ws_niflag_map[][2] = +{ + MAP_OPTION( NI_NOFQDN ), + MAP_OPTION( NI_NUMERICHOST ), + MAP_OPTION( NI_NAMEREQD ), + MAP_OPTION( NI_NUMERICSERV ), + MAP_OPTION( NI_DGRAM ), +}; + static const int ws_eai_map[][2] = { MAP_OPTION( EAI_AGAIN ), @@ -3327,7 +3336,7 @@ void WINAPI WS_freeaddrinfo(struct WS_addrinfo *res) } } -/* helper functions for getaddrinfo() */ +/* helper functions for getaddrinfo()/getnameinfo() */ static int convert_aiflag_w2u(int winflags) { int i, unixflags = 0; @@ -3341,6 +3350,19 @@ static int convert_aiflag_w2u(int winflags) { return unixflags; } +static int convert_niflag_w2u(int winflags) { + int i, unixflags = 0; + + for (i=0;i