This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.11-290-g7c93029


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  7c9302908ee9ce1c21d930923a879c2cbef5242f (commit)
       via  c3dfadb87e16f0fab6f4d5242bcecf06c02976c7 (commit)
      from  2b0fba7530eafb3d815b8c9f3d546d3494680102 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c9302908ee9ce1c21d930923a879c2cbef5242f

commit 7c9302908ee9ce1c21d930923a879c2cbef5242f
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Fri Mar 26 05:40:27 2010 -0700

    Don't abort immediately on successful lookup in getaddrinfo.
    
    When not using gethostbyname4 methods we immediately aborted the loop
    over the nss modules on the first successful lookup.  While this is
    almost always what is wanted the nsswitch.conf file allows to select
    something different.

diff --git a/ChangeLog b/ChangeLog
index 2ba417b..8117882 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-26  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't assume success always
+	means aborting the loop over the NSS methods.
+
 2010-03-25  Andreas Schwab  <schwab@redhat.com>
 
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Reset no_data before
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 8b7e38f..597189f 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -817,17 +817,17 @@ gaih_inet (const char *name, const struct gaih_service *service,
 				    canon = name;
 				}
 			    }
-
-			  break;
 			}
-
-		      /* We can have different states for AF_INET and
-			 AF_INET6.  Try to find a useful one for both.  */
-		      if (inet6_status == NSS_STATUS_TRYAGAIN)
-			status = NSS_STATUS_TRYAGAIN;
-		      else if (status == NSS_STATUS_UNAVAIL
-			       && inet6_status != NSS_STATUS_UNAVAIL)
-			status = inet6_status;
+		      else
+			{
+			  /* We can have different states for AF_INET and
+			     AF_INET6.  Try to find a useful one for both.  */
+			  if (inet6_status == NSS_STATUS_TRYAGAIN)
+			    status = NSS_STATUS_TRYAGAIN;
+			  else if (status == NSS_STATUS_UNAVAIL
+				   && inet6_status != NSS_STATUS_UNAVAIL)
+			    status = inet6_status;
+			}
 		    }
 		  else
 		    status = NSS_STATUS_UNAVAIL;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c3dfadb87e16f0fab6f4d5242bcecf06c02976c7

commit c3dfadb87e16f0fab6f4d5242bcecf06c02976c7
Author: Andreas Schwab <schwab@redhat.com>
Date:   Fri Mar 26 05:35:50 2010 -0700

    Fix spurious UNAVAIL status is getaddrinfo

diff --git a/ChangeLog b/ChangeLog
index d4d4826..2ba417b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-25  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Reset no_data before
+	each action.
+
 2010-03-26  Ulrich Drepper  <drepper@redhat.com>
 
 	* malloc/malloc.c: Remove stale reference to website.
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 62c38f6..8b7e38f 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -702,6 +702,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
 
 	  while (!no_more)
 	    {
+	      no_data = 0;
 	      nss_gethostbyname4_r fct4
 		= __nss_lookup_function (nip, "gethostbyname4_r");
 	      if (fct4 != NULL)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |   10 ++++++++++
 sysdeps/posix/getaddrinfo.c |   21 +++++++++++----------
 2 files changed, 21 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]