mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-28 14:54:05 +00:00
Remove redundant "if" statement, and use real rcv_wnd
rather than rcv_ann_wnd when deciding if packets are in-window. Contributed by <arasmussen@consultant.datasys.swri.edu>
This commit is contained in:
parent
7bc881ccc5
commit
24e0b25215
@ -21,6 +21,10 @@ HISTORY
|
|||||||
|
|
||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
2008-05-30 Kieran Mansley
|
||||||
|
* tcp_in.c Remove redundant "if" statement, and use real rcv_wnd
|
||||||
|
rather than rcv_ann_wnd when deciding if packets are in-window.
|
||||||
|
Contributed by <arasmussen@consultant.datasys.swri.edu>
|
||||||
|
|
||||||
2008-05-30 Kieran Mansley
|
2008-05-30 Kieran Mansley
|
||||||
* mem.h: Fix BUG#23254. Change macro definition of mem_* to allow
|
* mem.h: Fix BUG#23254. Change macro definition of mem_* to allow
|
||||||
|
@ -511,7 +511,7 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
|
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
|
||||||
pcb->rcv_nxt+pcb->rcv_ann_wnd)) {
|
pcb->rcv_nxt+pcb->rcv_wnd)) {
|
||||||
acceptable = 1;
|
acceptable = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1038,7 +1038,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
and below rcv_nxt + rcv_wnd) in order to be further
|
and below rcv_nxt + rcv_wnd) in order to be further
|
||||||
processed. */
|
processed. */
|
||||||
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
|
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
|
||||||
pcb->rcv_nxt + pcb->rcv_ann_wnd - 1)){
|
pcb->rcv_nxt + pcb->rcv_wnd - 1)){
|
||||||
if (pcb->rcv_nxt == seqno) {
|
if (pcb->rcv_nxt == seqno) {
|
||||||
accepted_inseq = 1;
|
accepted_inseq = 1;
|
||||||
/* The incoming segment is the next in sequence. We check if
|
/* The incoming segment is the next in sequence. We check if
|
||||||
@ -1282,10 +1282,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
|
tcp_ack_now(pcb);
|
||||||
pcb->rcv_nxt + pcb->rcv_ann_wnd-1)){
|
|
||||||
tcp_ack_now(pcb);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Segments with length 0 is taken care of here. Segments that
|
/* Segments with length 0 is taken care of here. Segments that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user