Add typed serial settings operations

Route bounded admin mutations through the existing administration
dispatcher,
covering apply, lifecycle, persistence, authorization, and result
tracking.
Add the browser controls, automatic result refresh, regression coverage,
and
phase documentation.
This commit is contained in:
2026-09-08 00:25:31 +02:00
parent 5a2aa0d4d8
commit 42548f6334
27 changed files with 1398 additions and 42 deletions
+8 -1
View File
@@ -18,6 +18,7 @@ static size_t body_offset;
static unsigned password_calls, cookie_count, sends, upgrades;
static unsigned fail_header, setter_calls;
static bool send_fail, recv_fail;
static size_t receive_fragment = 7;
static void (*password_hook)(void);
static char response_status[48];
static struct httpd_req_aux aux;
@@ -46,7 +47,7 @@ esp_err_t httpd_resp_sendstr(httpd_req_t *r, const char *body) {
}
int httpd_req_recv(httpd_req_t *r, char *out, size_t size) {
(void)r; if (recv_fail) return -1;
if (size > 7) size = 7; /* Fragment every login body. */
if (size > receive_fragment) size = receive_fragment;
memcpy(out, request_body + body_offset, size); body_offset += size;
aux.remaining_len -= size; return (int)size;
}
@@ -122,6 +123,9 @@ static void auth_reset(void) {
#ifdef HOST_SETTINGS
#include "settings_test.c"
#endif
#ifdef HOST_SERIAL_SETTINGS
#include "serial_settings_test.c"
#endif
int main(void) {
assert(store_tests() == 0); auth_reset();
@@ -272,6 +276,9 @@ int main(void) {
#endif
#ifdef HOST_SETTINGS
settings_tests();
#endif
#ifdef HOST_SERIAL_SETTINGS
serial_settings_tests();
#endif
return 0;
}