mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-03 18:23:48 +00:00
Only use router->send
This commit is contained in:
parent
473055d4e1
commit
1a91507fd8
@ -275,8 +275,7 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)
|
|||||||
return encodeResult; // FIXME - this isn't a valid ErrorCode
|
return encodeResult; // FIXME - this isn't a valid ErrorCode
|
||||||
}
|
}
|
||||||
#if HAS_UDP_MULTICAST
|
#if HAS_UDP_MULTICAST
|
||||||
if (udpThread && isFromUs(p) &&
|
if (udpThread && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
|
||||||
config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
|
|
||||||
udpThread->onSend(const_cast<meshtastic_MeshPacket *>(p));
|
udpThread->onSend(const_cast<meshtastic_MeshPacket *>(p));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -630,12 +629,6 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
|
|||||||
// After potentially altering it, publish received message to MQTT if we're not the original transmitter of the packet
|
// After potentially altering it, publish received message to MQTT if we're not the original transmitter of the packet
|
||||||
if ((decoded || p_encrypted->pki_encrypted) && moduleConfig.mqtt.enabled && !isFromUs(p) && mqtt)
|
if ((decoded || p_encrypted->pki_encrypted) && moduleConfig.mqtt.enabled && !isFromUs(p) && mqtt)
|
||||||
mqtt->onSend(*p_encrypted, *p, p->channel);
|
mqtt->onSend(*p_encrypted, *p, p->channel);
|
||||||
#endif
|
|
||||||
#if HAS_UDP_MULTICAST
|
|
||||||
if ((decoded || p_encrypted->pki_encrypted) && udpThread &&
|
|
||||||
config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {
|
|
||||||
udpThread->onSend(const_cast<meshtastic_MeshPacket *>(p_encrypted));
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user