X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/secnet/blobdiff_plain/4ff0a42ff7efe5cc1b36e9c5ff930609b3f56b86..508bb58325dbacebda8dd6ec7703c5446c339d21:/secnet.c?ds=inline diff --git a/secnet.c b/secnet.c index 2bf50fd..36750ec 100644 --- a/secnet.c +++ b/secnet.c @@ -309,8 +309,11 @@ static void run(void) ((uint64_t)tv_now_global.tv_usec/(uint64_t)1000); idx=0; for (i=reg; i; i=i->next) { - if(fds[idx].revents & POLLNVAL) { - fatal("run: poll (%s) set POLLNVAL", i->desc); + int check; + for (check=0; checknfds; check++) { + if(fds[idx+check].revents & POLLNVAL) { + fatal("run: poll (%s#%d) set POLLNVAL", i->desc, check); + } } i->after(i->state, fds+idx, i->nfds); idx+=i->nfds;