From b3c04e032d31e7b45c0be83872c448c2c11ff7fb Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 13 Jun 2006 10:59:42 +0100 Subject: [PATCH] rpcrt4: getaddrinfo returns any non-zero value on failure, not just negative values. --- dlls/rpcrt4/rpc_transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 62473629e88..4249d2a072f 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -481,7 +481,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection) hints.ai_next = NULL; ret = getaddrinfo(Connection->NetworkAddr, Connection->Endpoint, &hints, &ai); - if (ret < 0) + if (ret) { ERR("getaddrinfo failed: %s\n", gai_strerror(ret)); return RPC_S_SERVER_UNAVAILABLE; @@ -606,10 +606,10 @@ static size_t rpcrt4_ncacn_ip_tcp_get_top_of_tower(unsigned char *tower_data, hints.ai_next = NULL; ret = getaddrinfo(networkaddr, endpoint, &hints, &ai); - if (ret < 0) + if (ret) { ret = getaddrinfo("0.0.0.0", endpoint, &hints, &ai); - if (ret < 0) + if (ret) { ERR("getaddrinfo failed: %s\n", gai_strerror(ret)); return 0; -- 2.11.4.GIT