mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Fix free heap after last status
This commit is contained in:
parent
25f4070da2
commit
0584da8840
@ -412,18 +412,17 @@ void CmndPower(void)
|
|||||||
void CmndStatusResponse(uint32_t index) {
|
void CmndStatusResponse(uint32_t index) {
|
||||||
static String all_status = (const char*) nullptr;
|
static String all_status = (const char*) nullptr;
|
||||||
|
|
||||||
if (0 == XdrvMailbox.index) {
|
if (0 == XdrvMailbox.index) { // Command status0
|
||||||
if (99 == index) {
|
if (99 == index) {
|
||||||
all_status.replace("}{", ",");
|
all_status.replace("}{", ",");
|
||||||
char cmnd_status[10]; // STATUS11
|
char cmnd_status[10]; // STATUS11
|
||||||
snprintf_P(cmnd_status, sizeof(cmnd_status), PSTR(D_CMND_STATUS "0"));
|
snprintf_P(cmnd_status, sizeof(cmnd_status), PSTR(D_CMND_STATUS "0"));
|
||||||
MqttPublishPayloadPrefixTopicRulesProcess_P(STAT, cmnd_status, all_status.c_str());
|
MqttPublishPayloadPrefixTopicRulesProcess_P(STAT, cmnd_status, all_status.c_str());
|
||||||
all_status = (const char*) nullptr;
|
all_status = (const char*) nullptr;
|
||||||
|
} else {
|
||||||
|
if (0 == index) { all_status = ""; }
|
||||||
|
all_status += TasmotaGlobal.mqtt_data;
|
||||||
}
|
}
|
||||||
if (0 == index) {
|
|
||||||
all_status = "";
|
|
||||||
}
|
|
||||||
all_status += TasmotaGlobal.mqtt_data;
|
|
||||||
}
|
}
|
||||||
else if (index < 99) {
|
else if (index < 99) {
|
||||||
char cmnd_status[10]; // STATUS11
|
char cmnd_status[10]; // STATUS11
|
||||||
|
Loading…
x
Reference in New Issue
Block a user