We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 449ea49 commit 2fd818bCopy full SHA for 2fd818b
firmware/components/wifi_sniffer/cmd_sniffer.c
@@ -142,7 +142,15 @@ static bool should_stop_flash_sniffing(int32_t sniffed_packets) {
142
return false;
143
}
144
145
- size_t free_size = total_size - used_size;
+ size_t free_size = 0;
146
+
147
+ if(used_size >= total_size) {
148
+ ESP_LOGW(TAG, "Flash space critically low: %zu bytes free (minimum: %d bytes)",
149
+ free_size, PCAP_FLASH_MIN_FREE_BYTES);
150
+ return true;
151
+ }
152
153
+ free_size= total_size - used_size;
154
155
// Check if we have minimum free space
156
if (free_size < PCAP_FLASH_MIN_FREE_BYTES) {
0 commit comments