diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-12-03 08:20:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-12-03 08:20:07 +0000 |
commit | 9d0badad9cdf5d148264dfc9d4291c93efe231cb (patch) | |
tree | ad6da09084dcc612483236bd1af34940bd1623ae /lib/libc/yp/yp_maplist.c | |
parent | 2534d4fb826a2e20a81bd26e1012949ec8d9f5a5 (diff) |
never bitch about first failure
Diffstat (limited to 'lib/libc/yp/yp_maplist.c')
-rw-r--r-- | lib/libc/yp/yp_maplist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/yp/yp_maplist.c b/lib/libc/yp/yp_maplist.c index afd93c10276..474d1a6394e 100644 --- a/lib/libc/yp/yp_maplist.c +++ b/lib/libc/yp/yp_maplist.c @@ -30,7 +30,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: yp_maplist.c,v 1.4 1996/08/19 08:35:10 tholo Exp $"; +static char *rcsid = "$OpenBSD: yp_maplist.c,v 1.5 1996/12/03 08:20:04 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -57,7 +57,7 @@ yp_maplist(indomain, outmaplist) struct dom_binding *ysd; struct ypresp_maplist ypml; struct timeval tv; - int r; + int tries = 0, r; again: if (_yp_dobind(indomain, &ysd) != 0) @@ -71,7 +71,8 @@ again: r = clnt_call(ysd->dom_client, YPPROC_MAPLIST, xdr_domainname, &indomain, xdr_ypresp_maplist, &ypml, tv); if (r != RPC_SUCCESS) { - clnt_perror(ysd->dom_client, "yp_maplist: clnt_call"); + if (tries++) + clnt_perror(ysd->dom_client, "yp_maplist: clnt_call"); ysd->dom_vers = -1; goto again; } |