chiark
/
gitweb
/
~ianmdlvl
/
adns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo in changelog entry for 1.6.1
[adns.git]
/
src
/
poll.c
diff --git
a/src/poll.c
b/src/poll.c
index 1fe28f403f1cdb0ee0fd3d197eaeb8860b981c04..54d7a2fb3fd6a95b37a261001cc6f994272c0c50 100644
(file)
--- a/
src/poll.c
+++ b/
src/poll.c
@@
-3,11
+3,12
@@
* - wrappers for poll(2)
*/
/*
* - wrappers for poll(2)
*/
/*
- * This file is part of adns, which is Copyright (C) 1997-1999 Ian Jackson
+ * This file is part of adns, which is Copyright Ian Jackson
+ * and contributors (see the file INSTALL for full details).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version
2
, or (at your option)
+ * the Free Software Foundation; either version
3
, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* any later version.
*
* This program is distributed in the hope that it will be useful,
@@
-16,8
+17,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with this program; if not, write to the Free Software Foundation.
*/
#include <limits.h>
*/
#include <limits.h>
@@
-27,13
+27,13
@@
#ifdef HAVE_POLL
#ifdef HAVE_POLL
-int adns_beforepoll(adns_state ads, struct pollfd *fds, int *nfds_io,
int *timeout_io,
- const struct timeval *now) {
+int adns_beforepoll(adns_state ads, struct pollfd *fds, int *nfds_io,
+
int *timeout_io,
const struct timeval *now) {
struct timeval tv_nowbuf, tv_tobuf, *tv_to;
int space, found, timeout_ms, r;
struct pollfd fds_tmp[MAX_POLLFDS];
struct timeval tv_nowbuf, tv_tobuf, *tv_to;
int space, found, timeout_ms, r;
struct pollfd fds_tmp[MAX_POLLFDS];
- adns__consistency(ads,0,cc_ente
x
);
+ adns__consistency(ads,0,cc_ente
r
);
if (timeout_io) {
adns__must_gettimeofday(ads,&now,&tv_nowbuf);
if (timeout_io) {
adns__must_gettimeofday(ads,&now,&tv_nowbuf);
@@
-73,7
+73,7
@@
int adns_beforepoll(adns_state ads, struct pollfd *fds, int *nfds_io, int *timeo
}
r= 0;
xit:
}
r= 0;
xit:
- adns__
consistency(ads,0,cc_entex
);
+ adns__
returning(ads,0
);
return r;
}
return r;
}
@@
-81,13
+81,14
@@
void adns_afterpoll(adns_state ads, const struct pollfd *fds, int nfds,
const struct timeval *now) {
struct timeval tv_buf;
const struct timeval *now) {
struct timeval tv_buf;
- adns__consistency(ads,0,cc_ente
x
);
+ adns__consistency(ads,0,cc_ente
r
);
adns__must_gettimeofday(ads,&now,&tv_buf);
if (now) {
adns__timeouts(ads, 1, 0,0, *now);
adns__must_gettimeofday(ads,&now,&tv_buf);
if (now) {
adns__timeouts(ads, 1, 0,0, *now);
+ adns__intdone_process(ads); /* fdevents calls adns_processwriteable */
adns__fdevents(ads, fds,nfds, 0,0,0,0, *now,0);
}
adns__fdevents(ads, fds,nfds, 0,0,0,0, *now,0);
}
- adns__
consistency(ads,0,cc_entex
);
+ adns__
returning(ads,0
);
}
int adns_wait_poll(adns_state ads,
}
int adns_wait_poll(adns_state ads,
@@
-97,11
+98,11
@@
int adns_wait_poll(adns_state ads,
int r, nfds, to;
struct pollfd fds[MAX_POLLFDS];
int r, nfds, to;
struct pollfd fds[MAX_POLLFDS];
- adns__consistency(ads,0,cc_ente
x
);
+ adns__consistency(ads,0,cc_ente
r
);
for (;;) {
r= adns__internal_check(ads,query_io,answer_r,context_r);
for (;;) {
r= adns__internal_check(ads,query_io,answer_r,context_r);
- if (r != E
WOULDBLOCK
) goto xit;
+ if (r != E
AGAIN
) goto xit;
nfds= MAX_POLLFDS; to= -1;
adns_beforepoll(ads,fds,&nfds,&to,0);
r= poll(fds,nfds,to);
nfds= MAX_POLLFDS; to= -1;
adns_beforepoll(ads,fds,&nfds,&to,0);
r= poll(fds,nfds,to);
@@
-119,7
+120,7
@@
int adns_wait_poll(adns_state ads,
}
xit:
}
xit:
- adns__
consistency(ads,0,cc_entex
);
+ adns__
returning(ads,0
);
return r;
}
return r;
}