rx: fix file corruption on block checksum failure

Rather than dropping the bad block, rx was appending it
to the file.

Signed-off-by: Daniel Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Daniel Fandrich 2011-11-23 12:07:31 +01:00 committed by Denys Vlasenko
parent d2277e262f
commit 65a1ee956f

View File

@ -207,6 +207,7 @@ static int receive(/*int read_fd, */int file_fd)
continue;
error:
timeout:
blockLength = 0;
errors++;
if (errors == MAXERRORS) {
/* Abort */