fix: Fix-Runde 2 für Task 4 - Ablehnung sofort statt nach voller Resume-Schleife, Reset-Guard auch bei OOM greifen lassen

This commit is contained in:
Michael Sauer
2026-09-12 02:04:58 +02:00
parent 37c05d2f90
commit 2d5095574d
3 changed files with 36 additions and 1 deletions
+10 -1
View File
@@ -181,7 +181,16 @@ int http_fwup(HTTPParameters ClientParams)
// Send received data to fwup thread and deal with socket issues.
s8 ret = socket_fwup_recv(0, p, ERR_OK);
if(ret != ERR_OK){
now_state = SHUTDOWN_LINK;
/* ninlight: socket_fwup_recv() rejected this chunk (the fwup task hit a
* checksum/trailer mismatch or another fatal error, see wm_fwup.c) - recvLen
* never advances past this point, so going through SHUTDOWN_LINK used to start
* a full Range-resume retry (up to NL_OTA_MAX_RETRY_ROUNDS rounds) whose data
* the fwup task would just keep discarding. Bail out to QUIT_OTA directly so
* the caller gets the real error immediately instead of after minutes. Force
* nRetCode nonzero so the socket_fwup_err() cleanup below still runs. See
* sdk/PATCHES.md point 1. */
nRetCode = ret;
now_state = QUIT_OTA;
break;
}
else{