[En-Nut-Discussion] Suggested modification to nut\net\tcpsm.c again

Harald Kipp harald.kipp at egnite.de
Thu Nov 12 17:35:05 CET 2009


Hi Zack,

Nice to have the author of the first patch available.

ennut at thezachariasgroup.com wrote:
>    I have heartache casting the 32 bit result from NutGetMillis() to uint16_t.
>    Doesn't it make more sense to define so_retran_time as u_long 
> rather than u_short in sock_var.h ?

IMHO, that wouldn't make much difference, except better code for 32-bit
and slower as well as larger code for 8-bit targets.

We won't see retransmission timeouts above 65 seconds. On the contrary I
initially intended to limit its value to a few seconds, before I located
the real problem.

The NutGetMillis() overflow will happen anyway, no matter how many bits
we'll use.

> I didn't look at the code but

As I said, the first patch was contributed by *you*. ;-)

Harald





More information about the En-Nut-Discussion mailing list