Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* resolv/res_send.c (send_dg): Cope with failures.
  • Loading branch information
Ulrich Drepper committed Oct 24, 2004
1 parent 8cf2663 commit 8aeb505
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 6 additions & 4 deletions resolv/res_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 8aeb505

Please sign in to comment.