Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for TCP segment size calculation issue. #2658

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Sming/Arch/Esp8266/Components/esp-open-lwip/esp-open-lwip.patch
Original file line number Diff line number Diff line change
Expand Up @@ -605,3 +605,16 @@ index bbb126a..4cd8840 100644
+void espconn_init(void)
{
}
diff --git a/lwip/core/tcp_out.c b/lwip/core/tcp_out.c
index e2f8e9a..8f4d170 100644
--- a/lwip/core/tcp_out.c
+++ b/lwip/core/tcp_out.c
@@ -448,7 +448,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
if (oversize > 0) {
LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space);
seg = last_unsent;
- oversize_used = oversize < len ? oversize : len;
+ oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len));
pos += oversize_used;
oversize -= oversize_used;
space -= oversize_used;