summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2019-02-16 11:18:27 +0100
committerStefan Bühler <stbuehler@web.de>2019-02-16 11:26:50 +0100
commit9232145024ae20031b0eb36f028fda151710b980 (patch)
tree4b88ae999bc9473cb8646623cf12e41353b71d8c
parent1bd1d559b512876b8dca5dafa4d328cc6a837a37 (diff)
downloadlighttpd1.4-personal/stbuehler/fix-fdevent.zip
lighttpd1.4-personal/stbuehler/fix-fdevent.tar.gz
[core] poll: fdarray uses fd as index, not fde_ndxpersonal/stbuehler/fix-fdevent
-rw-r--r--src/fdevent_poll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fdevent_poll.c b/src/fdevent_poll.c
index ea52d84..ae76099 100644
--- a/src/fdevent_poll.c
+++ b/src/fdevent_poll.c
@@ -165,9 +165,9 @@ static int fdevent_poll_poll(fdevents *ev, int timeout_ms) {
fdnode *fdn;
ndx = fdevent_poll_event_next_fdndx(ev, ndx);
if (-1 == ndx) break;
- fdn = ev->fdarray[ndx];
+ fdn = ev->fdarray[ev->pollfds[ndx].fd];
if (0 == ((uintptr_t)fdn & 0x3)) {
- int revents = fdevent_poll_event_get_revent(ev, i);
+ int revents = fdevent_poll_event_get_revent(ev, ndx);
(*fdn->handler)(srv, fdn->ctx, revents);
}
}