summaryrefslogtreecommitdiffstats
path: root/sys/rpc
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2008-04-11 10:34:59 +0000
committerdfr <dfr@FreeBSD.org>2008-04-11 10:34:59 +0000
commit5dd963773ae028c909b38502e98d913b021614d9 (patch)
tree755cc6a0efa107e37096fd3acafbfaac5fd229f5 /sys/rpc
parent8facfb056964e9008f5d249e71fe0ccbe88fb62a (diff)
downloadFreeBSD-src-5dd963773ae028c909b38502e98d913b021614d9.zip
FreeBSD-src-5dd963773ae028c909b38502e98d913b021614d9.tar.gz
Fix some issues that showed up during Kris' testing.
Reported by: kris MFC after: 3 days
Diffstat (limited to 'sys/rpc')
-rw-r--r--sys/rpc/clnt_rc.c10
1 files changed, 8 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud