summaryrefslogtreecommitdiffstats
path: root/support/include
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-07-14 16:24:11 -0400
committerSteve Dickson <steved@redhat.com>2009-07-14 16:24:11 -0400
commitc7fa61e76f072d97a9bdb4a551aa2ba28e5818cc (patch)
treec6e4dbd2357cbbe5c71646be87b5929ad3f24aab /support/include
parente188c214f487c9783ab3ae3e987d9a98b9298dfb (diff)
downloadnfs-utils-c7fa61e76f072d97a9bdb4a551aa2ba28e5818cc.tar.gz
nfs-utils-c7fa61e76f072d97a9bdb4a551aa2ba28e5818cc.tar.xz
nfs-utils-c7fa61e76f072d97a9bdb4a551aa2ba28e5818cc.zip
getport: Clear shared error fields before trying rpcbind queries
Some RPC errors set fields in rpc_createerr.cf_error in addition to cf_stat. Be sure to clear _all_ error fields in rpc_createerr each time through the rpcbind API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include')
-rw-r--r--support/include/nfsrpc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/support/include/nfsrpc.h b/support/include/nfsrpc.h
index da3b4df..b3cdb8c 100644
--- a/support/include/nfsrpc.h
+++ b/support/include/nfsrpc.h
@@ -49,6 +49,15 @@
#define NSMPROG ((rpcprog_t)100024)
#endif
+/**
+ * nfs_clear_rpc_createerr - zap all error reporting fields
+ *
+ */
+static inline void nfs_clear_rpc_createerr(void)
+{
+ memset(&rpc_createerr, 0, sizeof(rpc_createerr));
+}
+
/*
* Look up an RPC program name in /etc/rpc
*/