lwip_sendmsg/tcp: prevent PSH until all iovecs are enqueued

(cherry picked from commit 1b3aaef525)
This commit is contained in:
goldsimon 2017-03-02 09:27:32 +01:00
parent fe6e1bd4af
commit df7485de1c

View File

@ -994,6 +994,10 @@ lwip_sendmsg(int s, const struct msghdr *msg, int flags)
((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0);
for (i = 0; i < msg->msg_iovlen; i++) {
u8_t apiflags = write_flags;
if (i + 1 < msg->msg_iovlen) {
apiflags |= NETCONN_MORE;
}
written = 0;
err = netconn_write_partly(sock->conn, msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len, write_flags, &written);
if (err == ERR_OK) {