* sysdeps/posix/getaddrinfo.c (gaih_inet): When the
authorUlrich Drepper <drepper@redhat.com>
Mon, 29 Dec 2008 23:47:07 +0000 (23:47 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 29 Dec 2008 23:47:07 +0000 (23:47 +0000)
gethostbyname4_r function call succeeded, just leave the loop.

ChangeLog
sysdeps/posix/getaddrinfo.c

index 22d8804..687d58b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-12-29  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/posix/getaddrinfo.c (gaih_inet): When the
+       gethostbyname4_r function call succeeded, just leave the loop.
+
        [BZ #9694]
        * wcsmbs/wchar.h: Move undefs for local __need_* constants to the
        very end.
index 6ff0fc4..d346c62 100644 (file)
@@ -714,6 +714,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
                      status = DL_CALL_FCT (fct4, (name, pat, tmpbuf,
                                                   tmpbuflen, &rc, &herrno,
                                                   NULL));
+                     if (status == NSS_STATUS_SUCCESS)
+                       break;
                      if (status != NSS_STATUS_TRYAGAIN
                          || rc != ERANGE || herrno != NETDB_INTERNAL)
                        {