[En-Nut-Discussion] NutTcpConnect freeze

Harald Kipp harald.kipp at egnite.de
Tue Oct 5 18:31:01 CEST 2010


On 05.10.2010 18:02, Ole Reinhardt wrote:
> Have you checked it in? Seems to be still the same in the trunk... Just
> found the second patch here?

I revoked my initial commit r3150 and committed Malte's patch to fix the
"Tiny connection failure" individually.

The special bit 0 handling is required, because sock->so_retran_time may
become zero during in

  sock->so_retran_time = (uint16_t) NutGetMillis();

But a zero value is also used to determine, that the timer has _not_
been set. So bit 0 is always set, when the timer is activated

  sock->so_retran_time = (uint16_t) NutGetMillis() | 1;

and masked when comparing timer values.

 delta = (uint16_t) NutGetMillis() - (sock->so_retran_time & ~1);

I further found, that it was me who re-introduced bug #3080997 while
applying the bit-0-patch.

http://ethernut.svn.sourceforge.net/viewvc/ethernut/trunk/nut/net/tcpsm.c?r1=2771&r2=2788

The same is true for branch 4.8. I'll fix that.

Thanks,

Harald



More information about the En-Nut-Discussion mailing list