mirror of https://github.com/arendst/Tasmota.git
Fix WifiManager Pop Up when no SSID is configured (#5575)
Fix WifiManager Pop Up when no SSID is configured (#5575)
This commit is contained in:
parent
8ff2759ccc
commit
2fd15c4633
|
@ -207,9 +207,8 @@ char* ulltoa(unsigned long long value, char *str, int radix)
|
|||
int i = 0;
|
||||
int n = 0;
|
||||
|
||||
/*
|
||||
if (radix < 2 || radix > 36) { radix = 10; }
|
||||
*/
|
||||
// if (radix < 2 || radix > 36) { radix = 10; }
|
||||
|
||||
do {
|
||||
n = value % radix;
|
||||
digits[i++] = (n < 10) ? (char)n+'0' : (char)n-10+'A';
|
||||
|
@ -396,7 +395,7 @@ bool ValidIpAddress(const char* str)
|
|||
{
|
||||
const char* p = str;
|
||||
|
||||
while (*p && ( (*p == '.') || (*p >= '0') || (*p <= '9') )) { p++; }
|
||||
while (*p && ((*p == '.') || ((*p >= '0') && (*p <= '9')))) { p++; }
|
||||
return (*p == '\0');
|
||||
}
|
||||
|
||||
|
|
|
@ -2148,6 +2148,7 @@ void HandleNotFound(void)
|
|||
/* Redirect to captive portal if we got a request for another domain. Return true in that case so the page handler do not try to handle the request again. */
|
||||
bool CaptivePortal(void)
|
||||
{
|
||||
// Possible hostHeader: connectivitycheck.gstatic.com or 192.168.4.1
|
||||
if ((WifiIsInManagerMode()) && !ValidIpAddress(WebServer->hostHeader().c_str())) {
|
||||
AddLog_P(LOG_LEVEL_DEBUG, PSTR(D_LOG_HTTP D_REDIRECTED));
|
||||
|
||||
|
|
Loading…
Reference in New Issue