From: ian Date: Fri, 15 Oct 1999 16:58:29 +0000 (+0000) Subject: @@ -2,6 +2,7 @@ X-Git-Tag: wip.base.getaddrinfo~230 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a8701ddcf5a58a106415adcef72fd3b01f9c098f;p=adns.git @@ -2,6 +2,7 @@ Bugfixes: + * Avoid infinite timeouts, causing lockup, when they should be zero ! --- diff --git a/changelog b/changelog index 148bf01..ed6e54c 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,7 @@ adns (0.6) unstable; urgency=medium Bugfixes: * Do not fail assertion if _qf_owner, _qf_search, domain ends in `.'. + * Avoid infinite timeouts, causing lockup, when they should be zero ! * Dynamic library building works properly. * adnshost prints somewhat better messages about some wrong usages. * Include stdlib.h in adnshost.h. diff --git a/src/event.c b/src/event.c index 9384085..b3f71dd 100644 --- a/src/event.c +++ b/src/event.c @@ -183,7 +183,12 @@ void adns__timeouts(adns_state ads, int act, if (!tv_io) continue; inter_maxtoabs(tv_io,tvbuf,now,qu->timeout); } else { - if (!act) continue; + if (!act) { + tvbuf.tv_sec= 0; + tvbuf.tv_usec= 0; + *tv_io= &tvbuf; + return; + } LIST_UNLINK(ads->timew,qu); if (qu->state != query_tosend) { adns__query_fail(qu,adns_s_timeout);