mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-14 06:42:34 +00:00
Drop PKI acks if there is no downlink on MQTTClientProxy (#8580)
* Discard everything if downlink isn't on * Drop PKI packets when downlink not on
This commit is contained in:
committed by
GitHub
parent
531cad5e88
commit
8fe98db5dd
@@ -66,6 +66,20 @@ inline void onReceiveProto(char *topic, byte *payload, size_t length)
|
||||
(strcmp(e.channel_id, channels.getGlobalId(ch.index)) == 0 && ch.settings.downlink_enabled))) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool anyChannelHasDownlink = false;
|
||||
size_t numChan = channels.getNumChannels();
|
||||
for (size_t i = 0; i < numChan; ++i) {
|
||||
const auto &c = channels.getByIndex(i);
|
||||
if (c.settings.downlink_enabled) {
|
||||
anyChannelHasDownlink = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(e.channel_id, "PKI") == 0 && !anyChannelHasDownlink) {
|
||||
return;
|
||||
}
|
||||
// Generate node ID from nodenum for comparison
|
||||
std::string nodeId = nodeDB->getNodeId();
|
||||
if (strcmp(e.gateway_id, nodeId.c_str()) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user