clnt_geterr()

The clnt_geterr() call copies the error structure from a client's handle to the local structure.

Syntax

#include <rpc\rpc.h>

void
clnt_geterr(clnt, errp)
CLIENT *clnt;
struct rpc_err *errp;

Parameters

clnt

errp

Examples

u_long procnum;register CLIENT *clnt;
enum clnt_stat cs;
struct timeval  total_timeout;
int intsend = 100, intrecv;
struct rpc_err error;
...
total_timeout.tv_sec = 20;
total_timeout.tv_usec = 0;
...
cs=clnt_call(clnt, procnum, xdr_int, &intsend,
   xdr_int, &intrecv, total_timeout);
if ( cs != RPC_SUCCESS)
     {
           clnt_geterr(clnt, &error);
           clnt_perror(clnt, "recv from server");
     }
...

Related Calls


[Back: clnt_freeres()]
[Next: clnt_pcreateerror()]