X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fc-ares-dns%2Fserv_c-ares-dns.c;h=de124f64b2191c4776785dcad3cfc42e2c447ee1;hb=757d27c6e4c9eefec77b1b4c4c41ea2a8b312007;hp=5f8426f9894731910675c94ff78c99ce3ddd537c;hpb=f73ec44ea6fb12fe23b7a021993dff8a28cbe0f7;p=citadel.git diff --git a/citadel/modules/c-ares-dns/serv_c-ares-dns.c b/citadel/modules/c-ares-dns/serv_c-ares-dns.c index 5f8426f98..de124f64b 100644 --- a/citadel/modules/c-ares-dns/serv_c-ares-dns.c +++ b/citadel/modules/c-ares-dns/serv_c-ares-dns.c @@ -218,9 +218,19 @@ void QueryCb(void *arg, IO->DNSStatus = status; if (status == ARES_SUCCESS) IO->DNS_CB(arg, abuf, alen); + else + IO->DNSStatus = status; /// ev_io_stop(event_base, &IO->dns_io_event); - - IO->PostDNS(IO); + + ev_timer_init(&IO->unwind_stack_timeout, + IO_postdns_callback, 0.0, 0); + IO->unwind_stack_timeout.data = IO; + ev_timer_start(event_base, &IO->unwind_stack_timeout); +} + +void QueryCbDone(AsyncIO *IO) +{ + ev_timer_stop(event_base, &IO->unwind_stack_timeout); }