]> git.sesse.net Git - betaftpd/blobdiff - ftpd.c
do_download(): Removed the check for f->upload :-D
[betaftpd] / ftpd.c
diff --git a/ftpd.c b/ftpd.c
index 757c109e677d88091e8b513e9f16124f27d1e695..637469b9a2b4c98cc41220cf4fbe9209c5d45ec9 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;
@@ -791,11 +790,7 @@ int do_download(struct ftran *f)
         * Here we use a rather simplified sending `algorithm',
         * leaving most of the quirks to the system calls.
         */
-       if (f->dir_listing == 0
-#if WANT_UPLOAD
-               && f->upload == 0
-#endif
-       ) {
+       if (f->dir_listing == 0) {
                int err;
                size = f->size - f->pos;