if (tv_mod && (!*tv_mod || (*tv_mod)->tv_sec || (*tv_mod)->tv_usec)) {
/* The caller is planning to sleep. */
adns__must_gettimeofday(ads,&now,&tv_nowbuf);
- if (!now) { inter_immed(tv_mod,tv_iobuf); goto xit; }
+ if (!now) { inter_immed(tv_mod,tv_tobuf); goto xit; }
adns__timeouts(ads, 1, tv_mod,tv_tobuf, *now);
}
void **context_r) {
int r, maxfd, rsel;
fd_set readfds, writefds, exceptfds;
- struct timeval *now, nowbuf, tvbuf, *tvp;
+ struct timeval tvbuf, *tvp;
adns__consistency(ads,*query_io,cc_entex);
for (;;) {
if (r != EAGAIN) break;
maxfd= 0; tvp= 0;
FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds);
+ ads->bug_if_query_done_now= 1;
adns_beforeselect(ads,&maxfd,&readfds,&writefds,&exceptfds,&tvp,&tvbuf,0);
+ ads->bug_if_query_done_now= 0;
assert(tvp);
rsel= select(maxfd,&readfds,&writefds,&exceptfds,tvp);
if (rsel==-1) {