commit 2220c3f77380003b173dd321811f2fe7c123c25e
parent 919c6d4e52197b22aebb60342cfc06c1e80b2b73
Author: ng0 <ng0@n0.is>
Date: Tue, 30 Jul 2019 13:33:21 +0000
partial fix to sendmsg code
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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);