From b03d6ff7646b29efc06bea00e7ed117c1d78f6dc Mon Sep 17 00:00:00 2001 From: Andre K Date: Wed, 13 Mar 2024 18:41:23 -0300 Subject: [PATCH] use decoded packets in public MQTT range test/detection sensor filter --- src/mqtt/MQTT.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 4250ad5cdf..c518bc4b5c 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -486,9 +486,9 @@ void MQTT::onSend(const meshtastic_MeshPacket &mp, const meshtastic_MeshPacket & auto &ch = channels.getByIndex(chIndex); - if (&mp.decoded && strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0 && - (mp.decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP || - mp.decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP)) { + if (&mp_decoded.decoded && strcmp(moduleConfig.mqtt.address, default_mqtt_address) == 0 && + (mp_decoded.decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP || + mp_decoded.decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP)) { LOG_DEBUG("MQTT onSend - Ignoring range test or detection sensor message on public mqtt\n"); return; }