summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2020-12-15 09:43:18 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2020-12-15 09:43:18 +0000
commit1d0272a600c7e64f641c3193eabd41f467c2d6ff (patch)
tree860fbf58481dd71e52b0f4d4045f1d460beb4a30 /libexec
parent369d70ec9282cccf131ab0400b05dad13ba8116d (diff)
downloadsrc-test-1d0272a600c7e64f641c3193eabd41f467c2d6ff.tar.gz
src-test-1d0272a600c7e64f641c3193eabd41f467c2d6ff.zip
When receiving a file having a length, which is a mulitple of the blocksize,
close the file once it is received. Reported by: Timo Voelker MFC after: 1 week
Notes
Notes: svn path=/head/; revision=368657
Diffstat (limited to 'libexec')
-rw-r--r--libexec/tftpd/tftp-transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/tftpd/tftp-transfer.c b/libexec/tftpd/tftp-transfer.c
index 2f3dc3fe05600..0a0c099e4c33e 100644
--- a/libexec/tftpd/tftp-transfer.c
+++ b/libexec/tftpd/tftp-transfer.c
@@ -397,9 +397,9 @@ tftp_receive(int peer, uint16_t *block, struct tftp_stats *ts,
send_error(peer, ENOSPACE);
goto abort;
}
- if (n_data != segsize)
- write_close();
}
+ if (n_data != segsize)
+ write_close();
windowblock++;
/* Only send ACKs for the last block in the window. */