From 5dd963773ae028c909b38502e98d913b021614d9 Mon Sep 17 00:00:00 2001 From: dfr Date: Fri, 11 Apr 2008 10:34:59 +0000 Subject: Fix some issues that showed up during Kris' testing. Reported by: kris MFC after: 3 days --- sys/rpc/clnt_rc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/rpc') diff --git a/sys/rpc/clnt_rc.c b/sys/rpc/clnt_rc.c index ab93773..8b5fc26 100644 --- a/sys/rpc/clnt_rc.c +++ b/sys/rpc/clnt_rc.c @@ -139,6 +139,9 @@ clnt_reconnect_connect(CLIENT *cl) (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers, rc->rc_sendsz, rc->rc_recvsz); + if (!rc->rc_client) + return (rpc_createerr.cf_stat); + CLNT_CONTROL(rc->rc_client, CLSET_FD_CLOSE, 0); CLNT_CONTROL(rc->rc_client, CLSET_CONNECT, &one); CLNT_CONTROL(rc->rc_client, CLSET_TIMEOUT, &rc->rc_timeout); @@ -163,8 +166,11 @@ clnt_reconnect_call( enum clnt_stat stat; do { - if (!rc->rc_client) - clnt_reconnect_connect(cl); + if (!rc->rc_client) { + stat = clnt_reconnect_connect(cl); + if (stat != RPC_SUCCESS) + return (stat); + } stat = CLNT_CALL(rc->rc_client, proc, xargs, argsp, xresults, resultsp, utimeout); -- cgit v1.1