summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-10-24 20:12:08 +0000
committeryar <yar@FreeBSD.org>2004-10-24 20:12:08 +0000
commit9167ecf0cb4ee1d0de414cc56590ffde049f85ff (patch)
treef10ca7f03ba90afb50d8e25d81c36f95c376f753 /libexec/ftpd/ftpd.c
parente24e0aa793617968e1b3b1e0b759f3bb6540468e (diff)
downloadFreeBSD-src-9167ecf0cb4ee1d0de414cc56590ffde049f85ff.zip
FreeBSD-src-9167ecf0cb4ee1d0de414cc56590ffde049f85ff.tar.gz
Log the actual number of bytes sent on the wire to /var/log/ftpd
instead of the disk size of the file sent. Since the log file is intended to provide data for anonymous ftp traffic accounting, the disk size of the file isn't really informative in this case. PR: bin/72687 Submitted by: Oleg Koreshkov MFC after: 1 week
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r--libexec/ftpd/ftpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index e8e25b4..10e4387 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1701,8 +1701,8 @@ retrieve(char *cmd, char *name)
time(&start);
send_data(fin, dout, st.st_blksize, st.st_size,
restart_point == 0 && cmd == 0 && S_ISREG(st.st_mode));
- if (cmd == 0 && guest && stats)
- logxfer(name, st.st_size, start);
+ if (cmd == 0 && guest && stats && byte_count > 0)
+ logxfer(name, byte_count, start);
(void) fclose(dout);
data = -1;
pdata = -1;
OpenPOWER on IntegriCloud