From 80e1d1599d1f9e037c89d7fb72d65e64a93a7c32 Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Sun, 24 Apr 2022 17:02:20 +0200 Subject: [PATCH] compatibility for esp32 --- ESPFirewall/lib/Firewall/src/API.hpp | 1 - ESPFirewall/lib/Firewall/src/Storage.cpp | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ESPFirewall/lib/Firewall/src/API.hpp b/ESPFirewall/lib/Firewall/src/API.hpp index af2ad43..b9d066f 100644 --- a/ESPFirewall/lib/Firewall/src/API.hpp +++ b/ESPFirewall/lib/Firewall/src/API.hpp @@ -3,7 +3,6 @@ #ifdef ESP32 #include "WebServer.h" -#include "WebServerSecure.h" #elif defined(ESP8266) #include "ESP8266WebServer.h" #include "ESP8266WebServerSecure.h" diff --git a/ESPFirewall/lib/Firewall/src/Storage.cpp b/ESPFirewall/lib/Firewall/src/Storage.cpp index 4b6024b..0ab5c6e 100644 --- a/ESPFirewall/lib/Firewall/src/Storage.cpp +++ b/ESPFirewall/lib/Firewall/src/Storage.cpp @@ -42,6 +42,7 @@ namespace fw uint16_t Storage::eeprom_rule_position(uint8_t key) { +#ifdef ESP8266 firewall_rule_t rule; uint8_t total_space_needed = 0; total_space_needed += sizeof(rule.source); @@ -50,6 +51,9 @@ namespace fw total_space_needed += sizeof(rule.protocol); // key-1 because key will be in range 1-255, but we need 1 less for multiplication return eeprom_rules_head + (key - 1) * total_space_needed; +#elif defined(ESP32) + return 0; +#endif } uint8_t Storage::retrieve_settings_value(const char *key)