Correctly transmit empty file

This commit is contained in:
Joseph C. Lehner 2016-02-07 22:14:04 +01:00
parent 8c25c63efd
commit d210bbebf5

2
tftp.c
View file

@ -272,7 +272,7 @@ int tftp_put(struct nmrpd_args *args)
ret = len; ret = len;
goto cleanup; goto cleanup;
} else if (!len) { } else if (!len) {
if (last_len != 512) { if (last_len != 512 && last_len != -1) {
break; break;
} }
} }