diff options
| author | deraadt <deraadt@NetBSD.org> | 1994-09-20 07:20:36 +0000 |
|---|---|---|
| committer | deraadt <deraadt@NetBSD.org> | 1994-09-20 07:20:36 +0000 |
| commit | 432a32dc3352bf3a4fdc8a25cc3affc673d4ee81 (patch) | |
| tree | 840580ae0bfbf7f43a17fb946409d2dd2e31ff14 /lib/libc | |
| parent | 2f658e4b73fee0361c12cf25e0e37e91fbfc6e18 (diff) | |
don't print a "not responding" message for first failure.
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/yp/yplib.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c index 18064334150..850ea263d26 100644 --- a/lib/libc/yp/yplib.c +++ b/lib/libc/yp/yplib.c @@ -30,7 +30,7 @@ */ #ifndef LINT -static char *rcsid = "$Id: yplib.c,v 1.11 1994/09/18 02:56:00 deraadt Exp $"; +static char *rcsid = "$Id: yplib.c,v 1.12 1994/09/20 07:20:36 deraadt Exp $"; #endif #include <sys/param.h> @@ -184,6 +184,7 @@ struct dom_binding **ypdb; int clnt_sock, fd, gpid; CLIENT *client; int new=0, r; + int count = 0; gpid = getpid(); if( !(pid==-1 || pid==gpid) ) { @@ -281,8 +282,11 @@ trynet: r = clnt_call(client, YPBINDPROC_DOMAIN, xdr_domainname, dom, xdr_ypbind_resp, &ypbr, tv); if(r != RPC_SUCCESS) { - fprintf(stderr, - "YP: server for domain %s not responding, still trying\n", dom); + if (new==0 || count) + fprintf(stderr, + "YP server for domain %s not responding, still trying\n", + dom); + count++; clnt_destroy(client); ysd->dom_vers = -1; goto again; |
