diff options
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index 1f187902..d19d4a57 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -928,20 +928,17 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection, | |||
928 | vector[1].iov_len = body_size; | 928 | vector[1].iov_len = body_size; |
929 | 929 | ||
930 | #if HAVE_SENDMSG | 930 | #if HAVE_SENDMSG |
931 | memset (&msg, 0, sizeof(struct msghdr)); | 931 | memset (&msg, 0, sizeof(msg)); |
932 | msg.msg_iov = vector; | 932 | msg.msg_iov = vector; |
933 | msg.msg_iovlen = 2; | 933 | msg.msg_iovlen = 2; |
934 | 934 | ||
935 | ret = sendmsg (s, &msg, MSG_NOSIGNAL_OR_ZERO); | 935 | ret = sendmsg (s, &msg, MSG_NOSIGNAL_OR_ZERO); |
936 | if ( (-1 == ret) && | ||
937 | (EAGAIN == errno) ) | ||
938 | return MHD_ERR_AGAIN_; | ||
939 | #elif HAVE_WRITEV | 936 | #elif HAVE_WRITEV |
940 | ret = writev (s, vector, 2); | 937 | ret = writev (s, vector, 2); |
938 | #endif | ||
941 | if ( (-1 == ret) && | 939 | if ( (-1 == ret) && |
942 | (EAGAIN == errno) ) | 940 | (EAGAIN == errno) ) |
943 | return MHD_ERR_AGAIN_; | 941 | return MHD_ERR_AGAIN_; |
944 | #endif | ||
945 | 942 | ||
946 | /* If there is a need to push the data from network buffers | 943 | /* If there is a need to push the data from network buffers |
947 | * call post_send_setopt(). */ | 944 | * call post_send_setopt(). */ |