summaryrefslogtreecommitdiff
path: root/libexec/tftpd/tftp-transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/tftpd/tftp-transfer.c')
-rw-r--r--libexec/tftpd/tftp-transfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/tftpd/tftp-transfer.c b/libexec/tftpd/tftp-transfer.c
index 1f130b498e2ee..2f3dc3fe05600 100644
--- a/libexec/tftpd/tftp-transfer.c
+++ b/libexec/tftpd/tftp-transfer.c
@@ -258,6 +258,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_stats *ts,
if (firstblock != NULL) {
writesize = write_file(firstblock->th_data, fb_size);
ts->amount += writesize;
+ ts->blocks++;
windowblock++;
if (windowsize == 1 || fb_size != segsize) {
for (i = 0; ; i++) {
@@ -280,7 +281,6 @@ tftp_receive(int peer, uint16_t *block, struct tftp_stats *ts,
}
if (fb_size != segsize) {
- ts->blocks++;
write_close();
gettimeofday(&(ts->tstop), NULL);
return;