mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08:00
tcp: use tcp_ack_now rather than manually setting TF_ACK_NOW
This commit is contained in:
parent
90873d6c71
commit
ba7a3204cb
@ -1921,7 +1921,7 @@ tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
|
|||||||
if ((pcb->state != TIME_WAIT) &&
|
if ((pcb->state != TIME_WAIT) &&
|
||||||
(pcb->state != LISTEN) &&
|
(pcb->state != LISTEN) &&
|
||||||
(pcb->flags & TF_ACK_DELAY)) {
|
(pcb->flags & TF_ACK_DELAY)) {
|
||||||
pcb->flags |= TF_ACK_NOW;
|
tcp_ack_now(pcb);
|
||||||
tcp_output(pcb);
|
tcp_output(pcb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,7 +708,7 @@ tcp_timewait_input(struct tcp_pcb *pcb)
|
|||||||
|
|
||||||
if ((tcplen > 0)) {
|
if ((tcplen > 0)) {
|
||||||
/* Acknowledge data, FIN or out-of-window SYN */
|
/* Acknowledge data, FIN or out-of-window SYN */
|
||||||
pcb->flags |= TF_ACK_NOW;
|
tcp_ack_now(pcb);
|
||||||
tcp_output(pcb);
|
tcp_output(pcb);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -446,7 +446,7 @@ struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg);
|
|||||||
do { \
|
do { \
|
||||||
if((pcb)->flags & TF_ACK_DELAY) { \
|
if((pcb)->flags & TF_ACK_DELAY) { \
|
||||||
tcp_clear_flags(pcb, TF_ACK_DELAY); \
|
tcp_clear_flags(pcb, TF_ACK_DELAY); \
|
||||||
(pcb)->flags |= TF_ACK_NOW; \
|
tcp_ack_now(pcb); \
|
||||||
} \
|
} \
|
||||||
else { \
|
else { \
|
||||||
(pcb)->flags |= TF_ACK_DELAY; \
|
(pcb)->flags |= TF_ACK_DELAY; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user