]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 24 Oct 2004 09:20:14 +0000 (09:20 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 24 Oct 2004 09:20:14 +0000 (09:20 +0000)
* resolv/res_send.c (send_dg): Cope with failures.

ChangeLog
resolv/res_send.c

index d127766c733dd6bc19f8d7924e6e6fb4999d1927..35c488d485bb8dd5dd1b78d2f39aaebd0e94c51b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
 
+       * resolv/res_send.c (send_dg): Cope with failures.
+
        * include/libc-symbols.h: Define hidden attribute macros for
        libnss_files.
        * include/netdb.h: Use libnss_files_hidden_proto for the parsers
index 18e54dbcda11eba060ff8dfa7d207e17e0ca60e8..8fb21a94463fe5c3f54a528b65614ab41c03099c 100644 (file)
@@ -906,7 +906,7 @@ send_dg(res_state statp,
                                goto wait;
                        }
                }
-               Perror(statp, stderr, "select", errno);
+               Perror(statp, stderr, "poll", errno);
                res_nclose(statp);
                return (0);
        }
@@ -922,9 +922,7 @@ send_dg(res_state statp,
                pfd[0].events = POLLIN;
                ++nwritten;
                goto wait;
-       } else {
-               assert(pfd[0].revents & POLLIN);
-
+       } else if (pfd[0].revents & POLLIN) {
                fromlen = sizeof(struct sockaddr_in6);
                if (anssiz < MAXPACKET
                    && anscp
@@ -1030,6 +1028,10 @@ send_dg(res_state statp,
                 * next nameserver ought not be tried.
                 */
                return (resplen);
+       } else if (pfd[0].revents & (POLLERR | POLLHUP | POLLNVAL)) {
+               /* Something went wrong.  We can stop trying.  */
+               res_nclose(statp);
+               return (0);
        }
 }
 
This page took 0.047939 seconds and 5 git commands to generate.