X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ftpd.c;h=9cbf5e851507d3bd342bc0c070d2639585225312;hb=2628475ca21302627dff3ff1fb11a65871c2e483;hp=757c109e677d88091e8b513e9f16124f27d1e695;hpb=85c74b6283f53e8deeab46354a4d3971039b6d56;p=betaftpd 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;