summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-07-30 13:33:21 +0000
committerng0 <ng0@n0.is>2019-07-30 13:33:21 +0000
commit2220c3f77380003b173dd321811f2fe7c123c25e (patch)
treebb96c2bacb3d18ff956618883de37e1bb4b2e9a6
parent919c6d4e52197b22aebb60342cfc06c1e80b2b73 (diff)
partial fix to sendmsg code
-rw-r--r--src/microhttpd/mhd_send.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index dc7414c6..b2a52ba7 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -337,8 +337,11 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
#if HAVE_SENDMSG
struct msghdr msg;
- msg.msg_iov = vector;
memset(&msg, 0, sizeof(msg));
+
+ msg.msg_iov = vector;
+ msg.msg_iovlen = 2;
+
ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL);
#elif HAVE_WRITEV
iovcnt = sizeof (vector) / sizeof (struct iovec);