diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-10-08 02:47:01 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-10-08 02:47:01 +0000 |
commit | 54b592ee0d6df4eb56800d47f9353f266395d81d (patch) | |
tree | 2fb5afaf8c219d50bfabef0cc3124b2758d2d299 | |
parent | e1b2a3fc0635bdf7e58be508e3a0c2c65f8e7518 (diff) |
Make this compile after poll(2) change.
hin@ has the last word about it, tho.
-rw-r--r-- | kerberosIV/src/kadmin/admin_server.c | 7 | ||||
-rw-r--r-- | kerberosIV/src/kadmin/kadm_locl.h | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/kerberosIV/src/kadmin/admin_server.c b/kerberosIV/src/kadmin/admin_server.c index 904c5849c68..c3aeef4f442 100644 --- a/kerberosIV/src/kadmin/admin_server.c +++ b/kerberosIV/src/kadmin/admin_server.c @@ -266,7 +266,6 @@ kadm_listen(void) int admin_fd; int peer_fd; struct pollfd pfd[1]; - int nfds; struct sockaddr_in peer; int addrlen; int pid; @@ -305,14 +304,14 @@ kadm_listen(void) kill_children(); return(0); } - if ((found = poll(pfd, 1, 0) == 0) + if ((found = poll(pfd, 1, -1)) == 0) continue; /* no things read */ if (found < 0) { if (errno != EINTR) krb_log("select: %s",error_message(errno)); continue; - } - if (FD_ISSET(admin_fd, &readfds)) { + } + if (pfd[0].revents & POLLIN) { /* accept the conn */ addrlen = sizeof(peer); if ((peer_fd = accept(admin_fd, (struct sockaddr *)&peer, diff --git a/kerberosIV/src/kadmin/kadm_locl.h b/kerberosIV/src/kadmin/kadm_locl.h index ef163372539..e9cdb641558 100644 --- a/kerberosIV/src/kadmin/kadm_locl.h +++ b/kerberosIV/src/kadmin/kadm_locl.h @@ -97,6 +97,7 @@ #include <syslog.h> #endif +#include <poll.h> #include <err.h> #ifdef SOCKS |