[En-Nut-Discussion] Ethernut as TCP Client stops trying to connect after a while.

Nathan Moore nategoose at gmail.com
Tue Mar 11 18:44:32 CET 2008


>
> Im using a variable(uint16_t) to set the thread sleep time and that
> one is not type cast to a u_long.
> Can this (in som strange way) have something to do with this?
> ( NutSleep(data_exchange_timeout); )
>

You can try either casting it to u_long or declare a local u_long, assign
your
data_exchange_timeout to it.  That way you could also pass it to printf and
make sure that the value isn't being treated as a negative signed value in
the
cast.  I only mention that because passing a unsigned 16bit int to NutSleep
should implicitly convert it to a unsigned 32bit int, but that would explain
it looking like it died.  It wouldn't really explain it if the
data_exchange_timeout
weren't being changed during execution, though.

Nathan



More information about the En-Nut-Discussion mailing list