lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Small fix to tcp_out.c


From: Kieran Mansley
Subject: Re: [lwip-devel] Small fix to tcp_out.c
Date: Fri, 30 May 2008 13:21:59 +0100

On Wed, 2008-04-23 at 12:19 -0500, art r wrote:
> Greetings,
> 
>  
> 
> Looking at 1.3.0 from download dir.
> 
>  
> 
> The tcp_receive() function handles incoming packets. It tests for ‘pkt
> in the window’ on line 1040:
> 
>  
> 
> 1040:    if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 
> 
> 1041:                  pcb->rcv_nxt + pcb->rcv_ann_wnd - 1)){
> 
>  
> 
>  
> 
> The ‘else’ is on line 1284:
> 
>  
> 
> 1284:    } else {
> 
> 1285:        if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 
> 
> 1286:                           pcb->rcv_nxt + pcb->rcv_ann_wnd-1)){
> 
> 1287:        tcp_ack_now(pcb);
> 
>  
> 
> As the test on line 1285-6 is exactly the negation of the test on
> 1040, it appears redundant to me.

I agree.  Fixed.

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]