]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/nfs/getport.c
errno not be set on RPC errors
[nfs-utils.git] / support / nfs / getport.c
index 4d4b1c446b6c755c0eec56193aa122ab20614ccb..4bdf556e092fc5e3e33dea26b87bf1a0b3dab128 100644 (file)
@@ -398,6 +398,10 @@ static int nfs_gp_ping(CLIENT *client, struct timeval timeout)
                           (xdrproc_t)xdr_void, NULL,
                           timeout);
 
+       if (status != RPC_SUCCESS) {
+               rpc_createerr.cf_stat = status;
+               CLNT_GETERR(client, &rpc_createerr.cf_error);
+       }
        return (int)(status == RPC_SUCCESS);
 }
 
@@ -530,7 +534,7 @@ static unsigned long nfs_gp_pmap_getport(CLIENT *client,
 
        if (status != RPC_SUCCESS) {
                rpc_createerr.cf_stat = status;
-               clnt_geterr(client, &rpc_createerr.cf_error);
+               CLNT_GETERR(client, &rpc_createerr.cf_error);
                port = 0;
        } else if (port == 0)
                rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;