* resolv/res_send.c (send_dg): Cope with failures.
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
goto wait;
}
}
- Perror(statp, stderr, "select", errno);
+ Perror(statp, stderr, "poll", errno);
res_nclose(statp);
return (0);
}
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
* 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);
}
}