]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
support: Don't return RPC_UNKNOWNHOST from rpc_socket.c
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Jul 2009 20:17:28 +0000 (16:17 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 14 Jul 2009 20:17:28 +0000 (16:17 -0400)
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 <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
support/nfs/rpc_socket.c

index 2f76542e8f1a6ad88ca119845aaa68b8ac0d716f..a2255c304114ead58c975d884e203e62c88b1301 100644 (file)
@@ -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;
        }