rpcrt4: getaddrinfo returns any non-zero value on failure, not just negative values.

This commit is contained in:
Robert Shearman 2006-06-13 10:59:42 +01:00 committed by Alexandre Julliard
parent 2208694ab2
commit b3c04e032d
1 changed files with 3 additions and 3 deletions

View File

@ -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;