diff options
Diffstat (limited to 'src/lib/rpc/unit-test/rpc_test_clnt.c')
| -rw-r--r-- | src/lib/rpc/unit-test/rpc_test_clnt.c | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/src/lib/rpc/unit-test/rpc_test_clnt.c b/src/lib/rpc/unit-test/rpc_test_clnt.c new file mode 100644 index 000000000000..4e4a18a72019 --- /dev/null +++ b/src/lib/rpc/unit-test/rpc_test_clnt.c @@ -0,0 +1,22 @@ +#include "rpc_test.h" +#include <string.h> + +/* Default timeout can be changed using clnt_control() */ +static struct timeval TIMEOUT = { 25, 0 }; + +char ** +rpc_test_echo_1(argp, clnt) +	char **argp; +	CLIENT *clnt; +{ +	static char *clnt_res; + +	memset(&clnt_res, 0, sizeof (clnt_res)); +	if (clnt_call(clnt, RPC_TEST_ECHO, +		(xdrproc_t) xdr_wrapstring, (caddr_t) argp, +		(xdrproc_t) xdr_wrapstring, (caddr_t) &clnt_res, +		TIMEOUT) != RPC_SUCCESS) { +		return (NULL); +	} +	return (&clnt_res); +} | 
