Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/ftp/oftpd/files/patch-src_ftp__session.c
18157 views
1
--- src/ftp_session.c.orig 2004-03-25 20:46:40 UTC
2
+++ src/ftp_session.c
3
@@ -1165,7 +1165,7 @@ static void do_retr(ftp_session_t *f, const ftp_comman
4
/* for sendfile(), we still have to use a loop to avoid
5
having our watchdog time us out on large files - it does
6
allow us to avoid an extra copy to/from user space */
7
-#ifdef HAVE_SENDFILE
8
+/* #ifdef HAVE_SENDFILE
9
offset = f->file_offset;
10
file_size = stat_buf.st_size - offset;
11
while (offset < stat_buf.st_size) {
12
@@ -1200,7 +1200,7 @@ static void do_retr(ftp_session_t *f, const ftp_comman
13
14
watchdog_defer_watched(f->watched);
15
}
16
-#else
17
+#else */
18
for (;;) {
19
read_ret = read(file_fd, buf, sizeof(buf));
20
if (read_ret == -1) {
21
@@ -1219,7 +1219,7 @@ static void do_retr(ftp_session_t *f, const ftp_comman
22
23
watchdog_defer_watched(f->watched);
24
}
25
-#endif /* HAVE_SENDFILE */
26
+/* #endif */ /* HAVE_SENDFILE */
27
}
28
29
/* disconnect */
30
31