Path: blob/main/ftp/oftpd/files/patch-src_ftp__session.c
18157 views
--- src/ftp_session.c.orig 2004-03-25 20:46:40 UTC1+++ src/ftp_session.c2@@ -1165,7 +1165,7 @@ static void do_retr(ftp_session_t *f, const ftp_comman3/* for sendfile(), we still have to use a loop to avoid4having our watchdog time us out on large files - it does5allow us to avoid an extra copy to/from user space */6-#ifdef HAVE_SENDFILE7+/* #ifdef HAVE_SENDFILE8offset = f->file_offset;9file_size = stat_buf.st_size - offset;10while (offset < stat_buf.st_size) {11@@ -1200,7 +1200,7 @@ static void do_retr(ftp_session_t *f, const ftp_comman1213watchdog_defer_watched(f->watched);14}15-#else16+#else */17for (;;) {18read_ret = read(file_fd, buf, sizeof(buf));19if (read_ret == -1) {20@@ -1219,7 +1219,7 @@ static void do_retr(ftp_session_t *f, const ftp_comman2122watchdog_defer_watched(f->watched);23}24-#endif /* HAVE_SENDFILE */25+/* #endif */ /* HAVE_SENDFILE */26}2728/* disconnect */293031