-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIO: patch lwip1 MTU bug in travis (#1723)
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c | ||
index fa8d77f..a7b0595 100644 | ||
--- a/src/core/tcp_out.c | ||
+++ b/src/core/tcp_out.c | ||
@@ -469,7 +469,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; |