瀏覽代碼

Merge pull request #613 from aozima/pulls

fixed Lwip bug: Assert on TCP netconn_write with sndtimeout set
Bernard Xiong 9 年之前
父節點
當前提交
10fd3d34ad
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      components/net/lwip-1.4.1/src/api/api_msg.c
  2. 1 0
      components/net/lwip-head/src/api/api_msg.c

+ 1 - 0
components/net/lwip-1.4.1/src/api/api_msg.c

@@ -1235,6 +1235,7 @@ do_writemore(struct netconn *conn)
       /* partial write */
       err = ERR_OK;
       conn->current_msg->msg.w.len = conn->write_offset;
+      conn->write_offset = 0;
     }
   } else
 #endif /* LWIP_SO_SNDTIMEO */

+ 1 - 0
components/net/lwip-head/src/api/api_msg.c

@@ -1261,6 +1261,7 @@ lwip_netconn_do_writemore(struct netconn *conn)
       /* partial write */
       err = ERR_OK;
       conn->current_msg->msg.w.len = conn->write_offset;
+      conn->write_offset = 0;
     }
   } else
 #endif /* LWIP_SO_SNDTIMEO */