diff options
author | maxim <maxim@FreeBSD.org> | 2002-07-01 14:29:44 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2002-07-01 14:29:44 +0000 |
commit | 53025a95ff19c99a706b837be94878f4cf52cff5 (patch) | |
tree | 0ffa694f4be7a4902369f57c5b804f5f827875a4 /libexec | |
parent | 20e451e8dc81259aed016ba86f53495037c820cd (diff) | |
download | FreeBSD-src-53025a95ff19c99a706b837be94878f4cf52cff5.zip FreeBSD-src-53025a95ff19c99a706b837be94878f4cf52cff5.tar.gz |
Move 'byte_count' calculation just before 'recvurg' check. It is a global
variable and used in myoob().
PR: bin/38928
Submitted by: Oliver Fromme <olli@secnetix.de>
MFC after: 1 month
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ftpd/ftpd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 2ae2d6d..769e220 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1832,9 +1832,13 @@ send_data(FILE *instr, FILE *outstr, off_t blksize, off_t filesize, int 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; |