lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] bug in lwip_select()


From: Zschocke, Florian
Subject: Re: [lwip-users] bug in lwip_select()
Date: Wed, 18 Jun 2003 13:57:25 +0200

address@hidden wrote on Dienstag, 17. Juni 2003 16:07:

> Fixed in DEVEL branch by first adding 500 to timeout->tv_usec,
> then dividing it by 1000. 
> 
> That should give a 1 microsecond value as a minimum timeout for
> timeout = { 0, 0 }; 

How does this help? The timeout = {0,0} is treated seperately. But for a
timeout {0, 100} the msectimeout would now be

msectimeout =  ((0 * 1000) + ((100 + 500) /1000));

which is still 0. Shouldn't you use something like
(tv_usec<1000?1000:tv_usec)/1000 instead, maybe enhanced with proper
rounding for cases above 1000?

Florian.




reply via email to

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