From d70f358f3eb51cf3ed05de944ffdee5aa4110c66 Mon Sep 17 00:00:00 2001 From: tablatronix <807787+tablatronix@users.noreply.github.com> Date: Sun, 13 Mar 2022 21:34:26 -0500 Subject: [PATCH] add check to dissallow starting cp if already running This will avoid support inquiries and add a log --- WiFiManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index fa4094c..102071f 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -657,6 +657,13 @@ boolean WiFiManager::startConfigPortal() { boolean WiFiManager::startConfigPortal(char const *apName, char const *apPassword) { _begin(); + if(configPortalActive){ + #ifdef WM_DEBUG_LEVEL + DEBUG_WM(DEBUG_VERBOSE,F("Starting Config Portal FAILED, is already running")); + #endif + return false; + } + //setup AP _apName = apName; // @todo check valid apname ? _apPassword = apPassword;