From: Ulrich Drepper Date: Sun, 24 Oct 2004 09:20:14 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/fedora-glibc-20041102T1153~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8aeb5058b6457cf9ca8d76026cbb60ca07015570;p=thirdparty%2Fglibc.git Update. * resolv/res_send.c (send_dg): Cope with failures. --- diff --git a/ChangeLog b/ChangeLog index d127766c733..35c488d485b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-10-24 Ulrich Drepper + * 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 diff --git a/resolv/res_send.c b/resolv/res_send.c index 18e54dbcda1..8fb21a94463 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -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); } }