aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMaxim Konovalov <maxim@FreeBSD.org>2002-07-31 07:44:14 +0000
committerMaxim Konovalov <maxim@FreeBSD.org>2002-07-31 07:44:14 +0000
commita1535419abbfac6a09c1007bf07045002964912d (patch)
tree9cf5b90349376bac3eba1e59d479992ad889d694 /libexec
parent7febae28eb0ae44a604cf90246efba8c7afe62a1 (diff)
MFC rev. 1.102: move 'byte_count' calculation just before 'recvurg' check.
It is a global variable and used in myoob().
Notes
svn path=/stable/4/; revision=101020
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 1a4bf0cd5883..dde6d98acffe 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1800,9 +1800,13 @@ send_data(instr, outstr, blksize, filesize, isreg)
while (err != -1 && filesize > 0) {
err = sendfile(filefd, netfd, offset, 0,
(struct sf_hdtr *) NULL, &cnt, 0);
+ /*
+ * Calculate byte_count before OOB processing.
+ * It can be used in myoob() later.
+ */
+ byte_count += cnt;
if (recvurg)
goto got_oob;
- byte_count += cnt;
offset += cnt;
filesize -= cnt;