Imported Upstream version 1.15.1
[platform/upstream/krb5.git] / src / lib / rpc / unit-test / rpc_test_clnt.c
1 #include "rpc_test.h"
2 #include <string.h>
3
4 /* Default timeout can be changed using clnt_control() */
5 static struct timeval TIMEOUT = { 25, 0 };
6
7 char **
8 rpc_test_echo_1(argp, clnt)
9         char **argp;
10         CLIENT *clnt;
11 {
12         static char *clnt_res;
13
14         memset(&clnt_res, 0, sizeof (clnt_res));
15         if (clnt_call(clnt, RPC_TEST_ECHO,
16                 (xdrproc_t) xdr_wrapstring, (caddr_t) argp,
17                 (xdrproc_t) xdr_wrapstring, (caddr_t) &clnt_res,
18                 TIMEOUT) != RPC_SUCCESS) {
19                 return (NULL);
20         }
21         return (&clnt_res);
22 }