aboutsummaryrefslogtreecommitdiff
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)
downloadlibmicrohttpd-2220c3f77380003b173dd321811f2fe7c123c25e.tar.gz
libmicrohttpd-2220c3f77380003b173dd321811f2fe7c123c25e.zip
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,
337 337
338#if HAVE_SENDMSG 338#if HAVE_SENDMSG
339 struct msghdr msg; 339 struct msghdr msg;
340 msg.msg_iov = vector;
341 memset(&msg, 0, sizeof(msg)); 340 memset(&msg, 0, sizeof(msg));
341
342 msg.msg_iov = vector;
343 msg.msg_iovlen = 2;
344
342 ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL); 345 ret = sendmsg (s, &msg, MAYBE_MSG_NOSIGNAL);
343#elif HAVE_WRITEV 346#elif HAVE_WRITEV
344 iovcnt = sizeof (vector) / sizeof (struct iovec); 347 iovcnt = sizeof (vector) / sizeof (struct iovec);