Remove "Ignoring extra upload request" path

This commit is contained in:
Joseph C. Lehner 2024-11-29 16:37:53 +01:00
parent 913e0b9179
commit 61e0d0176c

18
nmrp.c
View file

@ -675,19 +675,13 @@ int nmrp_do(struct nmrpd_args *args)
break;
case NMRP_C_TFTP_UL_REQ:
if (!upload_ok) {
if (++ulreqs > 5) {
printf("Bailing out after %d upload requests.\n",
ulreqs);
tx.msg.code = NMRP_C_CLOSE_REQ;
break;
}
} else {
if (++ulreqs > 1) {
args->maybe_invalid_firmware_file = true;
if (verbosity) {
printf("Ignoring extra upload request.\n");
}
ethsock_set_timeout(sock, args->ul_timeout);
}
if (ulreqs > NMRP_MAX_UL_REQS) {
printf("Bailing out after %d upload requests.\n", ulreqs);
tx.msg.code = NMRP_C_CLOSE_REQ;
break;
}