]> git.sesse.net Git - betaftpd/blobdiff - ftpd.c
Updated the LSM entry with new dates and sizes, as I guess a 0.0.8 release is imminen...
[betaftpd] / ftpd.c
diff --git a/ftpd.c b/ftpd.c
index d3587815bd790c595ddd9d107f10601bd90612f2..812a95756005e766458d1abcacc665088a441b4c 100644 (file)
--- a/ftpd.c
+++ b/ftpd.c
@@ -625,15 +625,14 @@ int process_all_sendfiles(fd_set * const active_clients, const int num_ac)
 {
        struct ftran *f = NULL, *next = first_ftran->next_ftran;
        int checked_through = 0;
-       struct sockaddr tempaddr;
-       int tempaddr_len = sizeof(tempaddr);
+       int tempaddr_len = sizeof(struct sockaddr_in);
  
        while (next != NULL && checked_through < num_ac) {
                f = next;
                next = f->next_ftran;
 
-#if HAVE_UPLOAD
-               if (f->upload == 1 && fds[f->sock].revents & POLLHUP) {
+#if WANT_UPLOAD
+               if ((f->upload == 1) && (fds[f->sock].revents & POLLHUP)) {
                        finish_transfer(f);
                        continue;
                }
@@ -665,8 +664,7 @@ int process_all_sendfiles(fd_set * const active_clients, const int num_ac)
 
                if (f->state == 2) {            /* incoming PASV */
                        const unsigned int one = 1;
-                       const int tempsock = accept(f->sock, (struct sockaddr *)&tempaddr,
-                                                       &tempaddr_len);
+                       const int tempsock = accept(f->sock, &(f->sin), &tempaddr_len);
 
                        del_fd(f->sock);