* RRs with mailboxes never rejected due to strange chars if _raw.
* Lack of a mailbox produces `.' not `<>'.
* Better usage messages (and no default query domain) for adnstest.
+ * Return EAGAIN from _check instead of EWOULDBLOCK.
Bugfixes:
* Do not invoke __autosys indirectly from __procdgram (result: coredump
*/
static const char * const cvsid =
- "$Id: adnslogres.c,v 1.4 1999/10/10 13:16:24 ian Exp $";
+ "$Id: adnslogres.c,v 1.5 1999/10/12 22:56:16 ian Exp $";
#include <sys/types.h>
#include <sys/time.h>
err= adns_wait(adns, &head->query, &answer, NULL);
else
err= adns_check(adns, &head->query, &answer, NULL);
- if (err != EWOULDBLOCK) {
+ if (err != EAGAIN) {
printline(head->start, head->addr, head->rest,
answer->status == adns_s_ok ? *answer->rrs.str : NULL);
line= head; head= head->next;
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
- * $Id: adns.h,v 1.66 1999/10/12 19:14:49 ian Exp $
+ * $Id: adns.h,v 1.67 1999/10/12 22:55:15 ian Exp $
*/
#ifndef ADNS_H_INCLUDED
/* permanent errors */
adns_s_nxdomain,
- adns_s_nodata
+ adns_s_nodata,
+
+ adns_s_max_permfail= 499
} adns_status;
* values.
*
* For _wait and _check failures are reported in the answer
- * structure, and only 0, ESRCH or (for _check) EWOULDBLOCK is
+ * structure, and only 0, ESRCH or (for _check) EAGAIN is
* returned: if no (appropriate) requests are done adns_check returns
- * EWOULDBLOCK; if no (appropriate) requests are outstanding both
+ * EAGAIN; if no (appropriate) requests are outstanding both
* adns_query and adns_wait return ESRCH.
*
* Additionally, _wait can return EINTR if you set adns_if_eintr.
* adns_submit 2
* adns_submit 3
* adns_wait 1
- * adns_check 3 -> EWOULDBLOCK
+ * adns_check 3 -> EAGAIN
* adns_wait 2
* adns_wait 3
* ....
qu= *query_io;
if (!qu) {
- if (!ads->output.head) return EWOULDBLOCK;
+ if (!ads->output.head) return EAGAIN;
qu= ads->output.head;
} else {
- if (qu->id>=0) return EWOULDBLOCK;
+ if (qu->id>=0) return EAGAIN;
}
LIST_UNLINK(ads->output,qu);
*answer= qu->answer;
adns__consistency(ads,*query_io,cc_entex);
for (;;) {
r= adns__internal_check(ads,query_io,answer_r,context_r);
- if (r != EWOULDBLOCK) break;
+ if (r != EAGAIN) break;
maxfd= 0; tvp= 0;
FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptfds);
adns_beforeselect(ads,&maxfd,&readfds,&writefds,&exceptfds,&tvp,&tvbuf,0);
for (;;) {
r= adns__internal_check(ads,query_io,answer_r,context_r);
- if (r != EWOULDBLOCK) goto xit;
+ if (r != EAGAIN) goto xit;
nfds= MAX_POLLFDS; to= -1;
adns_beforepoll(ads,fds,&nfds,&to,0);
r= poll(fds,nfds,to);