From 3905bfc25b13c9d114704190b60238446b18f122 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 15 Oct 1999 16:58:29 +0000 Subject: [PATCH] + * Avoid infinite timeouts, causing lockup, when they should be zero ! @@ -2,6 +2,7 @@ Bugfixes: + * Avoid infinite timeouts, causing lockup, when they should be zero ! --- changelog | 1 + src/event.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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); -- 2.30.2