fix: abgewiesener fw_update verdirbt last_ota_error des laufenden Updates nicht mehr
Ein zweiter fw_update waehrend eines laufenden Downloads setzte s_error auf "busy". Da ota_task() nur bei leerem Fehlerfeld auf "download" zurueckfaellt, wurde ein spaeter gescheiterter Transfer danach als "busy" gemeldet statt als "download". Die Abweisung hat kein eigenes Ergebnis - sie wird der API mit 409 gemeldet, last_ota_error bleibt beim Ergebnis des laufenden bzw. letzten Updates. Dazu die Doku auf das am EVK gemessene Verhalten korrigiert: stirbt die Gegenstelle mitten im Download, haengt der Lesevorgang rund sieben Minuten in einem TCP-Timeout und bricht ohne Range-Resume ab. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6adf22fb52
commit
5e2dff375e
+1
-1
@@ -324,7 +324,7 @@ static void test_commands(void)
|
||||
|
||||
call(NL_HTTP_PUT, "/api/v1/system/command", TOKEN, "{\"command\":{\"type\":\"fw_update\",\"url\":\"http://x/y.img\"}}");
|
||||
TEST_ASSERT_EQUAL_INT(409, resp.status);
|
||||
TEST_ASSERT_EQUAL_STRING("fw_update busy or invalid url", error_text());
|
||||
TEST_ASSERT_EQUAL_STRING("an update is already running", error_text());
|
||||
TEST_ASSERT_EQUAL_STRING("http://x/y.img", fake_fw_url);
|
||||
fake_fw_result = 0;
|
||||
call(NL_HTTP_PUT, "/api/v1/system/command", TOKEN, "{\"command\":{\"type\":\"fw_update\",\"url\":\"http://x/y.img\"}}");
|
||||
|
||||
Reference in New Issue
Block a user