Skip to content

Commit

Permalink
Merge branch 'master' into feature_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
tablatronix committed Nov 18, 2023
2 parents d4faef5 + 3efb536 commit 23d7558
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2417,7 +2417,7 @@ void WiFiManager::handleNotFound() {
*/
boolean WiFiManager::captivePortal() {

if(!_enableCaptivePortal) return false; // skip redirections, @todo maybe allow redirection even when no cp ? might be useful
if(!_enableCaptivePortal || !configPortalActive) return false; // skip redirections if cp not enabled or not in ap mode

String serverLoc = toStringIp(server->client().localIP());

Expand Down
7 changes: 7 additions & 0 deletions WiFiManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,15 @@ class WiFiManager
boolean abort = false;
boolean reset = false;
boolean configPortalActive = false;


// these are state flags for portal mode, we are either in webportal mode(STA) or configportal mode(AP)
// these are mutually exclusive as STA+AP mode is not supported due to channel restrictions and stability
// if we decide to support this, these checks will need to be replaced with something client aware to check if client origin is ap or web
// These state checks are critical and used for internal function checks
boolean webPortalActive = false;
boolean portalTimeoutResult = false;

boolean portalAbortResult = false;
boolean storeSTAmode = true; // option store persistent STA mode in connectwifi
int timer = 0; // timer for debug throttle for numclients, and portal timeout messages
Expand Down

0 comments on commit 23d7558

Please sign in to comment.