parent
c621f2d3e3
commit
5d4c6866da
@ -73,6 +73,11 @@ void MqttHandleHuaweiClass::onMqttMessage(const espMqttClientTypes::MessagePrope
|
||||
{
|
||||
const CONFIG_T& config = Configuration.get();
|
||||
|
||||
// ignore messages if Huawei is disabled
|
||||
if (!config.Huawei_Enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
char token_topic[MQTT_MAX_TOPIC_STRLEN + 40]; // respect all subtopics
|
||||
strncpy(token_topic, topic, MQTT_MAX_TOPIC_STRLEN + 40); // convert const char* to char*
|
||||
|
||||
|
||||
@ -50,6 +50,11 @@ void MqttHandlePowerLimiterClass::onMqttMessage(const espMqttClientTypes::Messag
|
||||
{
|
||||
const CONFIG_T& config = Configuration.get();
|
||||
|
||||
// ignore messages if PowerLimiter is disabled
|
||||
if (!config.PowerLimiter_Enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
char token_topic[MQTT_MAX_TOPIC_STRLEN + 40]; // respect all subtopics
|
||||
strncpy(token_topic, topic, MQTT_MAX_TOPIC_STRLEN + 40); // convert const char* to char*
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user