- wm_internal_fls.c: TLS_DBGPRT_ERR ist in diesem Build wegkompiliert, daher printf() für die fehlgeschlagene s_fls2_lock-Anlage; PATCHES.md korrigiert. - nl_wifi_w600.c: der SoftAP-Backstop (Zerstören eines unerwarteten SDK-Softap) lief bisher innerhalb von lock()/unlock() - tls_wifi_softap_destroy() und clear_softap_param() greifen aber auf SDK-Zustand zu, nicht auf s_sm/die Credential-Puffer, die s_lock eigentlich schützt. Jetzt wird im Lock nur noch ein lokales Flag gesetzt, die SDK-Aufrufe laufen danach. - clear_softap_param() liest TLS_PARAM_ID_WPROTOCOL jetzt aus SRAM (FALSE) statt Flash (TRUE) - das Schreiben bleibt weiterhin geflasht. - app_main.c füttert den Watchdog erst, wenn Licht-, Netz- und HTTP-Task jeweils seit dem letzten Feed einen Fortschritt gemeldet haben. Dafür bekommen nl_wifi_w600.c (nl_net_beat) und nl_http_server.c (nl_http_beat) je einen volatile Heartbeat-Zähler; der HTTP-Listen-Socket bekommt ein SO_RCVTIMEO von 2 s auf accept(), damit er auch ohne Anfragen tickt.
19 lines
570 B
C
19 lines
570 B
C
#ifndef NL_HTTP_SERVER_H
|
|
#define NL_HTTP_SERVER_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "net/nl_api.h"
|
|
|
|
#define NL_HTTP_PORT 3333
|
|
|
|
/* Incremented once per accept() timeout and once per handled connection; app_main's
|
|
* watchdog feed checks it to make sure the HTTP task is still alive, not just the light
|
|
* task. The listen socket's 2 s accept timeout keeps this ticking even without requests. */
|
|
extern volatile uint32_t nl_http_beat;
|
|
|
|
/* Serves one connection at a time (listen backlog 4, 5 s receive timeout). */
|
|
void nl_http_server_start(const nl_api_ctx_t *ctx);
|
|
|
|
#endif
|