++ Bugfixes:
+ 2010-03-05: Simon Goldschmidt
+ * api_msg.c: Correctly set TCP_WRITE_FLAG_MORE when netconn_write is split
+ into multiple calls to tcp_write.
+
2010-02-21: Simon Goldschmidt
* opt.h, mem.h, dns.c: task #10140: Remove DNS_USES_STATIC_BUF (keep
the implementation of DNS_USES_STATIC_BUF==1)
size_t diff;
u8_t dontblock = netconn_is_nonblocking(conn) ||
(conn->current_msg->msg.w.apiflags & NETCONN_DONTBLOCK);
+ u8_t apiflags = conn->current_msg->msg.w.apiflags;
LWIP_ASSERT("conn != NULL", conn != NULL);
LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE));
#if LWIP_TCPIP_CORE_LOCKING
conn->flags |= NETCONN_FLAG_WRITE_DELAYED;
#endif
+ apiflags |= TCP_WRITE_FLAG_MORE;
} else {
len = (u16_t)diff;
}
#if LWIP_TCPIP_CORE_LOCKING
conn->flags |= NETCONN_FLAG_WRITE_DELAYED;
#endif
+ apiflags |= TCP_WRITE_FLAG_MORE;
}
if (dontblock && (len < conn->current_msg->msg.w.len)) {
/* failed to send all data at once -> nonblocking write not possible */
}
if (err == ERR_OK) {
LWIP_ASSERT("do_writemore: invalid length!", ((conn->write_offset + len) <= conn->current_msg->msg.w.len));
- err = tcp_write(conn->pcb.tcp, dataptr, len, conn->current_msg->msg.w.apiflags);
+ err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags);
}
if (dontblock && (err == ERR_MEM)) {
/* nonblocking write failed */