mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-23 11:16:45 +00:00
Add HASP_USE_HTTP checks
This commit is contained in:
parent
69b3882460
commit
4214bec6bb
@ -30,8 +30,10 @@ void networkStart(void)
|
||||
// haspProgressVal(255); // hide
|
||||
haspReconnect();
|
||||
debugStartSyslog();
|
||||
// mqttStart();
|
||||
// mqttStart();
|
||||
#if HASP_USE_HTTP > 0
|
||||
httpStart();
|
||||
#endif
|
||||
#if HASP_USE_MDNS > 0
|
||||
mdnsStart();
|
||||
#endif // HASP_USE_MDNS
|
||||
@ -43,7 +45,9 @@ void networkStop(void)
|
||||
|
||||
debugStopSyslog();
|
||||
// mqttStop();
|
||||
#if HASP_USE_HTTP > 0
|
||||
httpStop();
|
||||
#endif
|
||||
mdnsStop();
|
||||
}
|
||||
|
||||
|
@ -235,10 +235,13 @@ static void telnetProcessLine(const char* input)
|
||||
strcasecmp_P(input, PSTR("bye")) == 0) {
|
||||
telnetClientDisconnect();
|
||||
} else if(strcasecmp_P(input, PSTR("logoff")) == 0) {
|
||||
#if HASP_USE_HTTP > 0
|
||||
if(strcmp(input, http_config.password) == 0) {
|
||||
telnetClient.println(F("\r\n" D_USERNAME " "));
|
||||
telnetLoginState = TELNET_UNAUTHENTICATED;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
telnetClientDisconnect();
|
||||
}
|
||||
} else {
|
||||
@ -317,7 +320,7 @@ IRAM_ATTR void telnetLoop()
|
||||
if(telnetClient.connected()) {
|
||||
if(telnetConsole) {
|
||||
while(telnetConsole->readKey()) {
|
||||
if(!telnetConsole) return; // the telnetConsole was destroyed
|
||||
if(!telnetConsole) return; // the telnetConsole was destroyed
|
||||
if(bufferedTelnetClient.available() <= 0) bufferedTelnetClient.flush(); // flush pending updates
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user