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; }
This commit is contained in:
parent
be27572a45
commit
2943bd1c53
@ -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 @@ int *outvallen;
|
||||
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)) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user