From 85939c79373c22703af2f438824f77727d60fbb4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Mar 2002 00:43:13 +0000 Subject: [PATCH] (yp_all): Remove the hack introduced on 1998-09-29. Correctly close the UDP connection right away. --- nis/ypclnt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nis/ypclnt.c b/nis/ypclnt.c index 6dfdf86..7123f63 100644 --- a/nis/ypclnt.c +++ b/nis/ypclnt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -704,16 +704,16 @@ yp_all (const char *indomain, const char *inmap, return YPERR_DOMAIN; } - /* YPPROC_ALL get its own TCP channel to ypserv. Therefore we - close the socket opened by the __yp_bind call. */ - close (ydb->dom_socket); clnt_sock = RPC_ANYSOCK; clnt_sin = ydb->dom_server_addr; clnt_sin.sin_port = 0; + + /* We don't need the UDP connection anymore. */ + __yp_unbind (ydb); + clnt = clnttcp_create (&clnt_sin, YPPROG, YPVERS, &clnt_sock, 0, 0); if (clnt == NULL) { - __yp_unbind (ydb); __set_errno (saved_errno); return YPERR_PMAP; } @@ -737,7 +737,6 @@ yp_all (const char *indomain, const char *inmap, else res = YPERR_SUCCESS; - __yp_unbind (ydb); clnt_destroy (clnt); if (res == YPERR_SUCCESS && status != YP_NOMORE) -- 2.7.4