diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-01-13 10:31:31 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-01-13 10:31:31 +0000 |
commit | 4463cab18e20b344aa88e26bbd42ac1ccd3891b7 (patch) | |
tree | fc1912d9b9a0e6c4c3b5aae61aafc30979fc50ca | |
parent | e5d0ffd679ec17fdb4b6e617746d3a6494b7d602 (diff) | |
download | glibc-4463cab18e20b344aa88e26bbd42ac1ccd3891b7.tar.gz glibc-4463cab18e20b344aa88e26bbd42ac1ccd3891b7.tar.xz glibc-4463cab18e20b344aa88e26bbd42ac1ccd3891b7.zip |
Use binding dir only at first try.
-rw-r--r-- | nis/ypclnt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nis/ypclnt.c b/nis/ypclnt.c index d260745a60..9be4228b69 100644 --- a/nis/ypclnt.c +++ b/nis/ypclnt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996. @@ -49,7 +49,7 @@ typedef struct dom_binding dom_binding; static struct timeval RPCTIMEOUT = {25, 0}; static struct timeval UDPTIMEOUT = {5, 0}; -static int const MAXTRIES = 5; +static int const MAXTRIES = 2; static char __ypdomainname[NIS_MAXNAMELEN + 1] = "\0"; __libc_lock_define_initialized (static, ypbindlist_lock) static dom_binding *__ypbindlist = NULL; @@ -92,7 +92,7 @@ __yp_bind (const char *domain, dom_binding **ypdb) do { - try++; + ++try; if (try > MAXTRIES) { if (is_new) @@ -101,7 +101,7 @@ __yp_bind (const char *domain, dom_binding **ypdb) } #if USE_BINDINGDIR - if (ysd->dom_vers < 1 && try < 3) + if (ysd->dom_vers < 1 && try == 1) /* Try binding dir only first time */ { char path[strlen (BINDINGDIR) + strlen (domain) + 10]; struct iovec vec[2]; |