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
This commit is contained in:
tuexen 2020-12-15 09:43:18 +00:00
parent dcd0e1b704
commit 598815450f

View File

@ -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. */