X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/74c948317bd4785fbfa8b6047b8da2e1705b1863..4f973eb58f3af495d12489807e1d71a98ca95a86:/src/event.c diff --git a/src/event.c b/src/event.c index d54d847..1b527a2 100644 --- a/src/event.c +++ b/src/event.c @@ -454,12 +454,16 @@ void adns_beforeselect(adns_state ads, int *maxfd_io, fd_set *readfds_io, void adns_afterselect(adns_state ads, int maxfd, const fd_set *readfds, const fd_set *writefds, const fd_set *exceptfds, const struct timeval *now) { + struct timeval tv_buf; struct pollfd pollfds[MAX_POLLFDS]; - int npollfds; + int npollfds, i; + adns__must_gettimeofday(ads,&now,&tv_buf); + if (!now) return; adns_processtimeouts(ads,now); npollfds= adns__pollfds(ads,pollfds); + for (i=0; i