diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-02-26 11:20:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-02-26 11:20:59 +0000 |
commit | d111572f2f7c595060b9bafcadba98d5391d464c (patch) | |
tree | 6ede0af6714c7586d9f52caa90118ef6af4b21e0 /nis | |
parent | 14e9dd679a43ef9eb90adc0764152045caab6146 (diff) | |
download | glibc-d111572f2f7c595060b9bafcadba98d5391d464c.tar glibc-d111572f2f7c595060b9bafcadba98d5391d464c.tar.gz glibc-d111572f2f7c595060b9bafcadba98d5391d464c.tar.bz2 glibc-d111572f2f7c595060b9bafcadba98d5391d464c.zip |
Update.
1998-02-26 Ulrich Drepper <drepper@cygnus.com>
* nis/ypclnt.c (yp_master): Check result of strdup.
Patch by Thorsten Kukuk.
1998-02-26 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/ypclnt.c: Give clnt handle after error checking free, change
return codes to fix problems with rpc.nisd in YP mode on Ultra's.
1998-02-26 09:00 Ulrich Drepper <drepper@cygnus.com>
* misc/fstab.c: Partly rewritten to use dynamically allocated buffer.
Patch by Joe Keane <jgk@jgk.org>.
* misc/fstab.h (struct fstab): Change fs_type member to be const.
* misc/fstab.c: Remove casts in fs_type assignments.
1998-02-26 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/i386/fpu/bits/fenv.h: Correct typo. ISO C 9X defines
FE_TOWARDZERO and not FE_TOWARDSZERO. Reported by H.J. Lu.
* sysdeps/sparc/sparc64/fpu/bits/fenv.h: Likewise.
* sysdeps/sparc/sparc32/fpu/bits/fenv.h: Likewise.
* sysdeps/powerpc/bits/fenv.h: Likewise.
* sysdeps/m68k/fpu/bits/fenv.h: Likewise.
* sysdeps/generic/bits/fenv.h: Likewise.
* sysdeps/alpha/fpu/bits/fenv.h: Likewise.
* sysdeps/i386/fpu/fesetenv.c (fesetenv): Likewise.
* sysdeps/powerpc/test-arith.c (main): Likewise.
1998-02-25 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/i386/fpu/bits/mathinline.h: Also fix i386 versions of
the comparison macros.
1998-02-21 20:14 H.J. Lu <hjl@gnu.org>
* sysdeps/libm-ieee754/s_log2.c (ln2): Added.
(__log2): Fixed return values.
* sysdeps/libm-ieee754/s_log2f.c: Likewise.
1998-02-25 Ulrich Drepper <drepper@cygnus.com>
* math/math.h (isunordered): Rename local variables to ensure
correct code. Reported by HJ Lu.
1998-02-25 10:34 Ulrich Drepper <drepper@cygnus.com>
* sysdpes/i386/fpu/bits/mathinline.h (isgreater, isgreaterequal,
isless, islessequal, islessgreater, isunordered): Fix syntax for
fucompip instruction.
(isless, islessequal): Fix logic.
1998-02-21 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* math/libm-test.c (sqrt_test): Add test for sqrt(2).
(comparisons_test): New tests for comparison macros.
Diffstat (limited to 'nis')
-rw-r--r-- | nis/ypclnt.c | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/nis/ypclnt.c b/nis/ypclnt.c index f67a8f8b86..5b4cab3e8b 100644 --- a/nis/ypclnt.c +++ b/nis/ypclnt.c @@ -98,7 +98,7 @@ __yp_bind (const char *domain, dom_binding **ypdb) } #if USE_BINDINGDIR - if (ysd->dom_vers < 1) + if (ysd->dom_vers < 1 && try < 3) { char path[sizeof (BINDINGDIR) - 1 + strlen (domain) + 10]; struct iovec vec[2]; @@ -220,7 +220,7 @@ __yp_bind (const char *domain, dom_binding **ypdb) /* If the program exists, close the socket */ if (fcntl (ysd->dom_socket, F_SETFD, 1) == -1) - perror (_("fcntl: F_SETFD")); + perror ("fcntl: F_SETFD"); if (is_new && ypdb != NULL) { @@ -245,10 +245,11 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs, { dom_binding *ydb = NULL; bool_t use_ypbindlist = FALSE; - int try, result; + int try, status; + enum clnt_stat result; try = 0; - result = YPERR_YPERR; + status = YPERR_YPERR; __libc_lock_lock (ypbindlist_lock); if (__ypbindlist != NULL) @@ -268,7 +269,7 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs, else __libc_lock_unlock (ypbindlist_lock); - while (try < MAXTRIES && result != RPC_SUCCESS) + while (try < MAXTRIES && status != YPERR_SUCCESS)) { if (__yp_bind (domain, &ydb) != 0) { @@ -290,8 +291,11 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs, free (ydb); ydb = NULL; } - result = YPERR_RPC; + status = YPERR_RPC;; } + else + status = YPERR_SUCCESS; + try++; } if (use_ypbindlist) @@ -307,7 +311,7 @@ do_ypcall (const char *domain, u_long prog, xdrproc_t xargs, ydb = NULL; } - return result; + return status; } int @@ -407,7 +411,7 @@ yp_match (const char *indomain, const char *inmap, const char *inkey, { ypreq_key req; ypresp_val resp; - int result; + enum clnt_stat result; if (indomain == NULL || indomain[0] == '\0' || inmap == NULL || inmap[0] == '\0' || @@ -428,7 +432,7 @@ yp_match (const char *indomain, const char *inmap, const char *inkey, (caddr_t) & resp); if (result != RPC_SUCCESS) - return result; + return YPERR_RPC; if (resp.stat != YP_TRUE) return ypprot_err (resp.stat); @@ -448,7 +452,7 @@ yp_first (const char *indomain, const char *inmap, char **outkey, { ypreq_nokey req; ypresp_key_val resp; - int result; + enum clnt_stat result; if (indomain == NULL || indomain[0] == '\0' || inmap == NULL || inmap[0] == '\0') @@ -466,7 +470,7 @@ yp_first (const char *indomain, const char *inmap, char **outkey, (caddr_t) & resp); if (result != RPC_SUCCESS) - return result; + return YPERR_RPC; if (resp.stat != YP_TRUE) return ypprot_err (resp.stat); @@ -491,7 +495,7 @@ yp_next (const char *indomain, const char *inmap, const char *inkey, { ypreq_key req; ypresp_key_val resp; - int result; + enum clnt_stat result; if (indomain == NULL || indomain[0] == '\0' || inmap == NULL || inmap[0] == '\0' || @@ -512,7 +516,7 @@ yp_next (const char *indomain, const char *inmap, const char *inkey, (caddr_t) & resp); if (result != RPC_SUCCESS) - return result; + return YPERR_RPC; if (resp.stat != YP_TRUE) return ypprot_err (resp.stat); @@ -535,7 +539,7 @@ yp_master (const char *indomain, const char *inmap, char **outname) { ypreq_nokey req; ypresp_master resp; - int result; + enum clnt_stat result; if (indomain == NULL || indomain[0] == '\0' || inmap == NULL || inmap[0] == '\0') @@ -550,14 +554,14 @@ yp_master (const char *indomain, const char *inmap, char **outname) (caddr_t) & req, (xdrproc_t) xdr_ypresp_master, (caddr_t) & resp); if (result != RPC_SUCCESS) - return result; + return YPERR_RPC; if (resp.stat != YP_TRUE) return ypprot_err (resp.stat); *outname = strdup (resp.peer); xdr_free ((xdrproc_t) xdr_ypresp_master, (char *) &resp); - return YPERR_SUCCESS; + return *outname == NULL ? YPERR_YPERR : YPERR_SUCCESS; } int @@ -565,7 +569,7 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder) { struct ypreq_nokey req; struct ypresp_order resp; - int result; + enum clnt_stat result; if (indomain == NULL || indomain[0] == '\0' || inmap == NULL || inmap == '\0') @@ -580,7 +584,7 @@ yp_order (const char *indomain, const char *inmap, unsigned int *outorder) (caddr_t) & req, (xdrproc_t) xdr_ypresp_order, (caddr_t) & resp); if (result != RPC_SUCCESS) - return result; + return YPERR_RPC; if (resp.stat != YP_TRUE) return ypprot_err (resp.stat); @@ -606,13 +610,13 @@ __xdr_ypresp_all (XDR * xdrs, u_long * objp) { xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp); *objp = YP_YPERR; - return (FALSE); + return FALSE; } if (resp.more == 0) { xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp); *objp = YP_NOMORE; - return (FALSE); + return TRUE; } switch (resp.ypresp_all_u.val.stat) @@ -654,7 +658,8 @@ yp_all (const char *indomain, const char *inmap, { struct ypreq_nokey req; dom_binding *ydb = NULL; - int try, result; + int try, res; + enum clnt_stat result; struct sockaddr_in clnt_sin; CLIENT *clnt; unsigned long status; @@ -665,9 +670,9 @@ yp_all (const char *indomain, const char *inmap, return YPERR_BADARGS; try = 0; - result = YPERR_YPERR; + res = YPERR_YPERR; - while (try < MAXTRIES && result != RPC_SUCCESS) + while (try < MAXTRIES && res != YPERR_SUCCESS) { if (__yp_bind (indomain, &ydb) != 0) { @@ -691,31 +696,30 @@ yp_all (const char *indomain, const char *inmap, (caddr_t) &req, (xdrproc_t) __xdr_ypresp_all, (caddr_t) &status, RPCTIMEOUT); - clnt_destroy (clnt); - close (clnt_sock); if (result != RPC_SUCCESS) { - clnt_perror (ydb->dom_client, "yp_all: clnt_call"); - __yp_unbind (ydb); - free (ydb); - result = YPERR_RPC; + clnt_perror (clnt, "yp_all: clnt_call"); + res = YPERR_RPC; } else - result = YPERR_SUCCESS; + res = YPERR_SUCCESS; + + clnt_destroy (clnt); + close (clnt_sock); if (status != YP_NOMORE) return ypprot_err (status); try++; } - return result; + return res; } int yp_maplist (const char *indomain, struct ypmaplist **outmaplist) { struct ypresp_maplist resp; - int result; + enum clnt_stat result; if (indomain == NULL || indomain[0] == '\0') return YPERR_BADARGS; @@ -726,7 +730,7 @@ yp_maplist (const char *indomain, struct ypmaplist **outmaplist) (caddr_t) & indomain, (xdrproc_t) xdr_ypresp_maplist, (caddr_t) & resp); if (result != RPC_SUCCESS) - return result; + return YPERR_RPC; if (resp.stat != YP_TRUE) return ypprot_err (resp.stat); |