… | |
… | |
1457 | |
1457 | |
1458 | // create io watchers for each fd and a timer before blocking |
1458 | // create io watchers for each fd and a timer before blocking |
1459 | static void |
1459 | static void |
1460 | adns_prepare_cb (ev_loop *loop, ev_prepare *w, int revents) |
1460 | adns_prepare_cb (ev_loop *loop, ev_prepare *w, int revents) |
1461 | { |
1461 | { |
1462 | int timeout = 3600000;truct pollfd fds [nfd]; |
1462 | int timeout = 3600000; |
|
|
1463 | struct pollfd fds [nfd]; |
1463 | // actual code will need to loop here and realloc etc. |
1464 | // actual code will need to loop here and realloc etc. |
1464 | adns_beforepoll (ads, fds, &nfd, &timeout, timeval_from (ev_time ())); |
1465 | adns_beforepoll (ads, fds, &nfd, &timeout, timeval_from (ev_time ())); |
1465 | |
1466 | |
1466 | /* the callback is illegal, but won't be called as we stop during check */ |
1467 | /* the callback is illegal, but won't be called as we stop during check */ |
1467 | ev_timer_init (&tw, 0, timeout * 1e-3); |
1468 | ev_timer_init (&tw, 0, timeout * 1e-3); |