mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
sockets.c: Fix BUG#19161 - ensure milliseconds timeout is non-zero
when supplied timeout is also non-zero
This commit is contained in:
parent
f4f2bfe379
commit
c52ac01fbc
@ -38,6 +38,10 @@ HISTORY
|
||||
|
||||
++ Bug fixes:
|
||||
|
||||
2007-02-28 Kieran Mansley
|
||||
* sockets.c: Fix BUG#19161 - ensure milliseconds timeout is non-zero
|
||||
when supplied timeout is also non-zero
|
||||
|
||||
(STABLE-1.2.0)
|
||||
|
||||
2006-12-05 Leon Woestenberg
|
||||
|
@ -733,8 +733,11 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset,
|
||||
if (timeout == 0)
|
||||
/* Wait forever */
|
||||
msectimeout = 0;
|
||||
else
|
||||
else {
|
||||
msectimeout = ((timeout->tv_sec * 1000) + ((timeout->tv_usec + 500)/1000));
|
||||
if(msectimeout == 0)
|
||||
msectimeout = 1;
|
||||
}
|
||||
|
||||
i = sys_sem_wait_timeout(select_cb.sem, msectimeout);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user