Hans Leidekker : ws2_32: Pass NULL nodename on to native getaddrinfo.
Alexandre Julliard
julliard at winehq.org
Thu Nov 24 15:04:38 CST 2011
Module: wine
Branch: master
Commit: 8e5d5bf58aa4ad9ac638f0b6e6473b4b8e2dbe83
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e5d5bf58aa4ad9ac638f0b6e6473b4b8e2dbe83
Author: Hans Leidekker <hans at codeweavers.com>
Date: Thu Nov 24 11:31:35 2011 +0100
ws2_32: Pass NULL nodename on to native getaddrinfo.
---
dlls/ws2_32/socket.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 72e2a5f..cf33400 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -4824,14 +4824,15 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr
if (!nodename && !servname) return WSAHOST_NOT_FOUND;
if (!nodename)
- node = "localhost";
+ node = NULL;
else if (!nodename[0])
+ {
node = hostname = get_hostname();
+ if (!node) return WSA_NOT_ENOUGH_MEMORY;
+ }
else
node = nodename;
- if (!node) return WSA_NOT_ENOUGH_MEMORY;
-
if (hints) {
punixhints = &unixhints;
More information about the wine-cvs
mailing list