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:
parent
d2277e262f
commit
65a1ee956f
@ -207,6 +207,7 @@ static int receive(/*int read_fd, */int file_fd)
|
|||||||
continue;
|
continue;
|
||||||
error:
|
error:
|
||||||
timeout:
|
timeout:
|
||||||
|
blockLength = 0;
|
||||||
errors++;
|
errors++;
|
||||||
if (errors == MAXERRORS) {
|
if (errors == MAXERRORS) {
|
||||||
/* Abort */
|
/* Abort */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user