lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] tcp_enqueue fails at more than two tcp_enqueue's


From: Bill Auerbach
Subject: RE: [lwip-users] tcp_enqueue fails at more than two tcp_enqueue's
Date: Wed, 5 May 2010 12:17:30 -0400

>inside tcp.h I amended as follows:
>
>#define TCP_SEQ_LT(a,b)     ((s32_t)((a)-(b)) < 0) -- no change
>#define TCP_SEQ_LEQ(a,b)    ((s32_t)((a)-(b)) <= 0) -- no change
>#define TCP_SEQ_GT(a,b)     ((s32_t)((a)-(b)) > 0) -- no change
>#define TCP_SEQ_GEQ(a,b)    (((s32_t)(a)-(b)) >= 0) -- this line, I have
>shifted the cast and this works now

This change might not work for all values of ackno, pcb->lastack, and
pcb->snd_nxt.  The original macro is correct for comparing unsigned values
taking into account wrapping.

I would look into:

1.  Compiling without optimization.
2.  Comparing the compiler output of the original code and changed code.
It's not impossible for this to be a compiler problem.

Bill






reply via email to

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