From c7fa61e76f072d97a9bdb4a551aa2ba28e5818cc Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Tue, 14 Jul 2009 16:24:11 -0400 Subject: 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 Signed-off-by: Steve Dickson --- support/include/nfsrpc.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'support/include') 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 */ -- cgit