Bug #209 ยป 0100-wait.patch
bip/src/connection.c 2011-03-19 22:04:09.013163002 +0000 | ||
---|---|---|
{
|
||
fd_set fds_read, fds_write, fds_except;
|
||
int maxfd = -1, err;
|
||
int timeout = *msec;
|
||
list_t *cn_newdata;
|
||
list_iterator_t it;
|
||
struct timeval tv;
|
||
... | ... | |
else
|
||
*msec -= (etv.tv_sec - btv.tv_sec) * 1000
|
||
+ (etv.tv_usec - btv.tv_usec) / 1000;
|
||
/* in case we go forward in time */
|
||
if (*msec < 0)
|
||
if (*msec < 0 || *msec > timeout)
|
||
*msec = 0;
|
||
mylog(LOG_DEBUGTOOMUCH, "msec: %d, sec: %d, usec: %d", *msec, tv.tv_sec,
|
||
tv.tv_usec);
|