chiark / gitweb /
+ * 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 148bf018f399df2793098e9e17b5e281825577c8..ed6e54c56ff5ca9d1c80d74ba97c41d5a286cd18 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 9384085256eb392baf017ee1678001700d8c4b76..b3f71dd72c5149c5ba4dfe9ad92964c8f7c0111a 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);