diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-12-13 12:36:03 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2004-12-13 12:36:03 +0000 |
commit | f23c79cf24031bf7d4a42a6de191587765ed6367 (patch) | |
tree | e57e1ce15438d1d26d7c83d779c5545bc5a7dd7c /usr.sbin/ntpd | |
parent | 18448f1ff2cbf78ea7e7205d819ac53014332eea (diff) |
Check for error status from poll() too; ok henning@
Diffstat (limited to 'usr.sbin/ntpd')
-rw-r--r-- | usr.sbin/ntpd/ntp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c index 266e0b7cbd2..0646e850942 100644 --- a/usr.sbin/ntpd/ntp.c +++ b/usr.sbin/ntpd/ntp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntp.c,v 1.42 2004/11/12 17:24:52 henning Exp $ */ +/* $OpenBSD: ntp.c,v 1.43 2004/12/13 12:36:02 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -233,21 +233,21 @@ ntp_main(int pipe_prnt[2], struct ntpd_conf *nconf) ntp_quit = 1; } - if (nfds > 0 && pfd[PFD_PIPE_MAIN].revents & POLLIN) { + if (nfds > 0 && pfd[PFD_PIPE_MAIN].revents & (POLLIN|POLLERR)) { nfds--; if (ntp_dispatch_imsg() == -1) ntp_quit = 1; } for (j = 1; nfds > 0 && j < idx_peers; j++) - if (pfd[j].revents & POLLIN) { + if (pfd[j].revents & (POLLIN|POLLERR)) { nfds--; if (server_dispatch(pfd[j].fd, conf) == -1) ntp_quit = 1; } for (; nfds > 0 && j < i; j++) - if (pfd[j].revents & POLLIN) { + if (pfd[j].revents & (POLLIN|POLLERR)) { nfds--; if (client_dispatch(idx2peer[j - idx_peers], conf->settime) == -1) |