lwip: patch for resetting write offset

Otherwise, the assertion "already writing or closing" may fail.
This commit is contained in:
Christian Helmuth 2015-10-05 13:05:21 +02:00
parent aaea28ae85
commit bbf8a4f2ec
3 changed files with 16 additions and 2 deletions

View File

@ -1 +1 @@
3608c569747383625a1bca182683c3668fa630b5
136ee70f33ffced072262d589c24ab3252d15eff

View File

@ -14,7 +14,8 @@ PATCHES := $(addprefix src/lib/lwip/,window_scaling.patch \
errno.patch \
libc_select_notify.patch \
sockets_c_errno.patch \
sol_socket_definition.patch)
sol_socket_definition.patch \
api_msg.patch)
PATCH_OPT := -p1 -d src/lib/lwip

View File

@ -0,0 +1,13 @@
The write offset was not always reset after a write finished resulting in the
failed assertion "already writing or closing".
--- a/src/api/api_msg.c
+++ b/src/api/api_msg.c
@@ -1340,6 +1340,7 @@ err_mem:
and back to application task */
conn->current_msg->err = err;
conn->current_msg = NULL;
+ conn->write_offset = 0;
conn->state = NETCONN_NONE;
#if LWIP_TCPIP_CORE_LOCKING
if ((conn->flags & NETCONN_FLAG_WRITE_DELAYED) != 0)