From 548072daa6e34d6718e98921c568b245a9bd2750 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 14 Oct 2019 12:34:01 +0200 Subject: [PATCH] Fix compile errors relatd to LWIP_IPV6 Fix compile errors relatd to LWIP_IPV6 --- sonoff/support_wifi.ino | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sonoff/support_wifi.ino b/sonoff/support_wifi.ino index 60519322f..5e526198d 100644 --- a/sonoff/support_wifi.ino +++ b/sonoff/support_wifi.ino @@ -35,7 +35,7 @@ const uint8_t WIFI_RETRY_OFFSET_SEC = 20; // seconds #include // Wifi, MQTT, Ota, WifiManager #if LWIP_IPV6 #include // IPv6 DualStack -#endif +#endif // LWIP_IPV6=1 struct WIFI { uint32_t last_event = 0; // Last wifi connection event @@ -251,7 +251,7 @@ void WifiBegin(uint8_t flag, uint8_t channel) cfgcnt++; } } -#endif +#endif // LWIP_IPV6=1 } void WifiBeginAfterScan() @@ -376,7 +376,7 @@ void WifiSetState(uint8_t state) global_state.wifi_down = state ^1; } -#ifdef LWIP_IPV6 +#if LWIP_IPV6 bool WifiCheckIPv6(void) { bool ipv6_global=false; @@ -386,16 +386,16 @@ bool WifiCheckIPv6(void) } return ipv6_global; } -#endif +#endif // LWIP_IPV6=1 void WifiCheckIp(void) { -#ifdef LWIP_IPV6 +#if LWIP_IPV6 if(WifiCheckIPv6()) { Wifi.status = WL_CONNECTED; #else if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0)) { -#endif +#endif // LWIP_IPV6=1 WifiSetState(1); Wifi.counter = WIFI_CHECK_SEC; Wifi.retry = Wifi.retry_init; @@ -533,11 +533,11 @@ void WifiCheck(uint8_t param) Wifi.counter = WIFI_CHECK_SEC; WifiCheckIp(); } -#ifdef LWIP_IPV6 +#if LWIP_IPV6 if (WifiCheckIPv6()) { #else if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0) && !Wifi.config_type) { -#endif +#endif // LWIP_IPV6=1 WifiSetState(1); if (Settings.flag3.use_wifi_rescan) {