+ * Avoid infinite timeouts, causing lockup, when they should be zero !
authorian <ian>
Fri, 15 Oct 1999 16:58:29 +0000 (16:58 +0000)
committerian <ian>
Fri, 15 Oct 1999 16:58:29 +0000 (16:58 +0000)
@@ -2,6 +2,7 @@
   Bugfixes:
+  * Avoid infinite timeouts, causing lockup, when they should be zero !

changelog
src/event.c

index 148bf01..ed6e54c 100644 (file)
--- 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.
index 9384085..b3f71dd 100644 (file)
@@ -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);