upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/tollgate_main.c
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-18 19:55:33 +0530
committerYour Name <you@example.com>2026-05-18 19:55:33 +0530
commit65b4c9dc8626757f5f7cda279881b059e926916c (patch)
tree7f41d7faf5cd3bd86344eda056fc56269b646225 /main/tollgate_main.c
parent78d0c3795e9a90a9f99178e38346a53d9b2ebe57 (diff)
fix: divide-by-zero crash when no WiFi networks configured
- Guard tollgate_config_get_next_wifi against network_count=0 - Add fallback parsing for wifi_ssid/wifi_password flat fields - Add heap info to API server failure log for debugging - All 75 unit tests passing
Diffstat (limited to 'main/tollgate_main.c')
-rw-r--r--main/tollgate_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c
index 018d934..a39ccc9 100644
--- a/main/tollgate_main.c
+++ b/main/tollgate_main.c
@@ -5,6 +5,7 @@
5#include "esp_wifi.h" 5#include "esp_wifi.h"
6#include "esp_event.h" 6#include "esp_event.h"
7#include "esp_log.h" 7#include "esp_log.h"
8#include "esp_system.h"
8#include "nvs_flash.h" 9#include "nvs_flash.h"
9#include "esp_netif.h" 10#include "esp_netif.h"
10#include "lwip/netif.h" 11#include "lwip/netif.h"