mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Fix bug #50694 (TX exist more pbufs after enable LWIP_NETIF_TX_SINGLE_PBUF) by not executing phase 2 for LWIP_NETIF_TX_SINGLE_PBUF==1
This commit is contained in:
parent
4b68605276
commit
dd811bca06
@ -481,6 +481,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
|
|||||||
LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len));
|
LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len));
|
||||||
#endif /* TCP_OVERSIZE */
|
#endif /* TCP_OVERSIZE */
|
||||||
|
|
||||||
|
#if !LWIP_NETIF_TX_SINGLE_PBUF
|
||||||
/*
|
/*
|
||||||
* Phase 2: Chain a new pbuf to the end of pcb->unsent.
|
* Phase 2: Chain a new pbuf to the end of pcb->unsent.
|
||||||
*
|
*
|
||||||
@ -491,6 +492,10 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
|
|||||||
* We don't extend segments containing SYN/FIN flags or options
|
* We don't extend segments containing SYN/FIN flags or options
|
||||||
* (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at
|
* (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at
|
||||||
* the end.
|
* the end.
|
||||||
|
*
|
||||||
|
* This phase is skipped for LWIP_NETIF_TX_SINGLE_PBUF as we could only execute
|
||||||
|
* it after rexmit puts a segment from unacked to unsent and at this point,
|
||||||
|
* oversize info is lost.
|
||||||
*/
|
*/
|
||||||
if ((pos < len) && (space > 0) && (last_unsent->len > 0)) {
|
if ((pos < len) && (space > 0) && (last_unsent->len > 0)) {
|
||||||
u16_t seglen = LWIP_MIN(space, len - pos);
|
u16_t seglen = LWIP_MIN(space, len - pos);
|
||||||
@ -549,6 +554,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
|
|||||||
pcb->unsent_oversize == 0);
|
pcb->unsent_oversize == 0);
|
||||||
#endif /* TCP_OVERSIZE */
|
#endif /* TCP_OVERSIZE */
|
||||||
}
|
}
|
||||||
|
#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Phase 3: Create new segments.
|
* Phase 3: Create new segments.
|
||||||
|
Loading…
Reference in New Issue
Block a user