From 4ae90a83213075b16de83520a2c07402491bb33f Mon Sep 17 00:00:00 2001 From: ian Date: Tue, 12 Oct 1999 23:00:08 +0000 Subject: [PATCH] + * Give ESRCH, not EAGAIN, if _check called with no queries outstanding. @@ -19,6 +19,7 @@ + * Give ESRCH, not EAGAIN, if _check called with no queries outstanding. --- changelog | 2 +- src/event.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/changelog b/changelog index 6b63409..71d75b4 100644 --- a/changelog +++ b/changelog @@ -5,7 +5,7 @@ adns (0.5) unstable; urgency=medium Thanks to Tony Finch for the program and the performance figure. * New internal consistency checking with assert if right options set. * New adns_wait_poll function like adns_wait but uses poll, not select. - * New adnshost utility - very alpha. + * New adnshost utility - currently only a usage message :-). Incompatible changes: * RRs with mailboxes never rejected due to strange chars if _raw. diff --git a/src/event.c b/src/event.c index b2da291..9384085 100644 --- a/src/event.c +++ b/src/event.c @@ -565,8 +565,13 @@ int adns__internal_check(adns_state ads, qu= *query_io; if (!qu) { - if (!ads->output.head) return EAGAIN; - qu= ads->output.head; + if (ads->output.head) { + qu= ads->output.head; + } else if (ads->timew.head) { + return EAGAIN; + } else { + return ESRCH; + } } else { if (qu->id>=0) return EAGAIN; } -- 2.30.2