From 2628475ca21302627dff3ff1fb11a65871c2e483 Mon Sep 17 00:00:00 2001 From: sgunderson Date: Sun, 20 Aug 2000 17:21:41 +0000 Subject: [PATCH] process_all_clients(): Made the poll() checking code a little bit clearer. --- ftpd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ftpd.c b/ftpd.c index 757c109..9cbf5e8 100644 --- a/ftpd.c +++ b/ftpd.c @@ -557,7 +557,7 @@ void destroy_dcache(struct dcache * const d) /* * process_all_clients(): - * Processes all the control connections in active_clients + * Processes all the _control_ connections in active_clients * (normally returned from a select(), there are at max * NUM_AC active connections in the set), sending them * through to the command parser if a command has been @@ -579,7 +579,7 @@ int process_all_clients(const fd_set * const active_clients, const int num_ac) c = next; next = c->next_conn; #if HAVE_POLL - if (!fds[c->sock].revents & (POLLIN|POLLERR|POLLHUP|POLLNVAL)) { + if ((fds[c->sock].revents & (POLLIN|POLLERR|POLLHUP|POLLNVAL)) == 0) { continue; } #else @@ -620,7 +620,6 @@ int process_all_clients(const fd_set * const active_clients, const int num_ac) if (fds[c->sock].revents & (POLLERR|POLLHUP|POLLNVAL)) { destroy_conn(c); - continue; } } return checked_through; -- 2.39.2