[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 04/06: mhd_send: use MSG_MORE for iovec
From: |
gnunet |
Subject: |
[libmicrohttpd] 04/06: mhd_send: use MSG_MORE for iovec |
Date: |
Wed, 24 Feb 2021 17:48:49 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit f85f859219ab76b8d2c6a894d7d67ac19656bf9d
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Feb 23 21:40:00 2021 +0300
mhd_send: use MSG_MORE for iovec
---
src/microhttpd/mhd_send.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index c2cded87..f3028293 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -1288,7 +1288,7 @@ send_iov_nontls (struct MHD_Connection *connection,
return MHD_ERR_NOTCONN_;
}
- pre_send_setopt (connection, false, push_data);
+ pre_send_setopt (connection, true, push_data);
items_to_send = r_iov->cnt - r_iov->sent;
#ifdef HAVE_SENDMSG
@@ -1296,7 +1296,12 @@ send_iov_nontls (struct MHD_Connection *connection,
msg.msg_iov = r_iov->iov + r_iov->sent;
msg.msg_iovlen = items_to_send;
+#ifdef MHD_USE_MSG_MORE
+ res = sendmsg (connection->socket_fd, &msg,
+ MSG_NOSIGNAL_OR_ZERO | (push_data ? 0 : MSG_MORE));
+#else /* ! MHD_USE_MSG_MORE */
res = sendmsg (connection->socket_fd, &msg, MSG_NOSIGNAL_OR_ZERO);
+#endif /* ! MHD_USE_MSG_MORE */
#elif defined(HAVE_WRITEV)
res = writev (connection->socket_fd, r_iov->iov + r_iov->sent,
items_to_send);
@@ -1349,7 +1354,7 @@ send_iov_nontls (struct MHD_Connection *connection,
}
if (r_iov->cnt == r_iov->sent)
- post_send_setopt (connection, false, push_data);
+ post_send_setopt (connection, true, push_data);
else
{
#ifdef EPOLL_SUPPORT
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (bb2e08b6 -> 22752968), gnunet, 2021/02/24
- [libmicrohttpd] 01/06: SIGPIPE macros minor refactoring, gnunet, 2021/02/24
- [libmicrohttpd] 05/06: Bump MHD_VERSION, gnunet, 2021/02/24
- [libmicrohttpd] 06/06: ChangeLog updated, gnunet, 2021/02/24
- [libmicrohttpd] 04/06: mhd_send: use MSG_MORE for iovec,
gnunet <=
- [libmicrohttpd] 03/06: mhd_send: re-use MHD_VECT_SEND macro, gnunet, 2021/02/24
- [libmicrohttpd] 02/06: Implemented new function MHD_create_response_from_iovec(), gnunet, 2021/02/24