diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-03-21 00:48:55 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-03-21 00:48:55 +0000 |
commit | 576eeae319c2d47d75347b5764ce7d72ee159dd5 (patch) | |
tree | 77aa2c621d5d321f66be46f568c2f8053a436576 /lib/libc | |
parent | 75e7729810ee606a9f01e2ef4402ea9dd29c7fab (diff) | |
download | FreeBSD-src-576eeae319c2d47d75347b5764ce7d72ee159dd5.zip FreeBSD-src-576eeae319c2d47d75347b5764ce7d72ee159dd5.tar.gz |
Reviewed by: Bill Paul <wpaul@freebsd.org>
Submitted by: Sebastian Strollo <seb@erix.ericsson.se>
- In /usr/src/lib/libc/yp/yplib.c, function yp_first when clnt_call
fails with (r != RPC_SUCCESS) ysd->dom_vers should be set to 0! This
ensures that /var/yp/bindings/dom.vers will be read again on retry.
What happens now is that when our server is down and someone tries to
use yp they will continue to try until kingdom come. So:
if(r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_first: clnt_call");
ysd->dom_vers = -1;
^^^^ change to 0
goto again;
}
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/yp/yplib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c index 57f1df0..1187a66 100644 --- a/lib/libc/yp/yplib.c +++ b/lib/libc/yp/yplib.c @@ -28,7 +28,7 @@ */ #ifndef LINT -static char *rcsid = "$Id: yplib.c,v 1.2 1994/01/11 19:01:09 nate Exp $"; +static char *rcsid = "$Id: yplib.c,v 1.1 1994/08/07 23:04:55 wollman Exp $"; #endif #include <sys/param.h> @@ -472,7 +472,7 @@ again: xdr_ypreq_nokey, &yprnk, xdr_ypresp_key_val, &yprkv, tv); if(r != RPC_SUCCESS) { clnt_perror(ysd->dom_client, "yp_first: clnt_call"); - ysd->dom_vers = -1; + ysd->dom_vers = 0; goto again; } if( !(r=ypprot_err(yprkv.status)) ) { |