chiark
/
gitweb
/
~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
poll: Introduce and use BEFOREPOLL_WANT_FDS
[secnet]
/
log.c
diff --git
a/log.c
b/log.c
index 326a891955fed55f07a21d9db86fda216a12f1c9..95f01b6898d0eec03bab58f18684fbf1c7d51c3f 100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-485,9
+485,11
@@
static int log_from_fd_beforepoll(void *sst, struct pollfd *fds, int *nfds_io,
{
struct fdlog *st=sst;
if (!st->finished) {
-
*nfds_io=1
;
+
BEFOREPOLL_WANT_FDS(1)
;
fds[0].fd=st->fd;
fds[0].events=POLLIN;
+ } else {
+ BEFOREPOLL_WANT_FDS(0);
}
return 0;
}