aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--resolv/res_send.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fd462527a0..2dd220eaa5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
2012-03-30 Ulrich Drepper <drepper@gmail.com>
* resolv/res_send.c (send_dg): Use sendmmsg if we have to write two
- requests to save a system call.
+ requests to save a system call. Fix check that all bytes are sent.
* sysdeps/unix/sysv/linux/bits/socket.h (struct mmsghdr): Fix up
comments for sendmmsg.
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 0b5bc91995..968ede09fa 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -1171,7 +1171,7 @@ send_dg(res_state statp,
else
sr = send (pfd[0].fd, buf, buflen, MSG_NOSIGNAL);
- if (sr != buflen) {
+ if (sr != (nwritten != 0 ? buflen2 : buflen)) {
if (errno == EINTR || errno == EAGAIN)
goto recompute_resend;
Perror(statp, stderr, "send", errno);