From: Chuck Lever Date: Tue, 14 Jul 2009 20:17:28 +0000 (-0400) Subject: support: Don't return RPC_UNKNOWNHOST from rpc_socket.c X-Git-Tag: nfs-utils-1-2-1-rc2~25 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=56a1b590d2f60e62feb3589a7b5b6fab2fed75f7;p=nfs-utils.git support: Don't return RPC_UNKNOWNHOST from rpc_socket.c RPC_UNKNOWNHOST means a hostname isn't known -- basically it's EAI_NONAME from getaddrinfo(3). Since the functions in rpc_socket.c don't take a hostname argument, RPC_UNKNOWNHOST is not an appropriate return code from these functions. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/support/nfs/rpc_socket.c b/support/nfs/rpc_socket.c index 2f76542..a2255c3 100644 --- a/support/nfs/rpc_socket.c +++ b/support/nfs/rpc_socket.c @@ -458,7 +458,7 @@ CLIENT *nfs_get_rpcclient(const struct sockaddr *sap, } break; default: - rpc_createerr.cf_stat = RPC_UNKNOWNHOST; + rpc_createerr.cf_stat = RPC_UNKNOWNADDR; return NULL; } @@ -521,7 +521,7 @@ CLIENT *nfs_get_priv_rpcclient(const struct sockaddr *sap, } break; default: - rpc_createerr.cf_stat = RPC_UNKNOWNHOST; + rpc_createerr.cf_stat = RPC_UNKNOWNADDR; return NULL; }