]> git.sesse.net Git - betaftpd/commitdiff
process_all_clients(): Made the poll() checking code a little bit clearer.
authorsgunderson <sgunderson>
Sun, 20 Aug 2000 17:21:41 +0000 (17:21 +0000)
committersgunderson <sgunderson>
Sun, 20 Aug 2000 17:21:41 +0000 (17:21 +0000)
ftpd.c

diff --git a/ftpd.c b/ftpd.c
index 757c109e677d88091e8b513e9f16124f27d1e695..9cbf5e851507d3bd342bc0c070d2639585225312 100644 (file)
--- 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;