Merge pull request #6162 from s-hadinger/web_large_buffer

Increased Web command size
This commit is contained in:
Theo Arends 2019-08-01 23:09:39 +02:00 committed by GitHub
commit 4a8c7b3473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2165,7 +2165,7 @@ void HandleHttpCommand(void)
if (valid) {
uint32_t curridx = web_log_index;
String svalue = WebServer->arg("cmnd");
if (svalue.length() && (svalue.length() < INPUT_BUFFER_SIZE)) {
if (svalue.length() && (svalue.length() < MQTT_MAX_PACKET_SIZE)) {
ExecuteWebCommand((char*)svalue.c_str(), SRC_WEBCOMMAND);
if (web_log_index != curridx) {
uint32_t counter = curridx;
@ -2231,7 +2231,7 @@ void HandleConsoleRefresh(void)
uint32_t counter = 0; // Initial start, should never be 0 again
String svalue = WebServer->arg("c1");
if (svalue.length() && (svalue.length() < INPUT_BUFFER_SIZE)) {
if (svalue.length() && (svalue.length() < MQTT_MAX_PACKET_SIZE)) {
AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_COMMAND "%s"), svalue.c_str());
ExecuteWebCommand((char*)svalue.c_str(), SRC_WEBCONSOLE);
}