woops - was too fast there

This commit is contained in:
Thomas Göttgens 2022-12-30 14:53:34 +01:00
parent 65aad62702
commit e73ae7cdac

View File

@ -221,6 +221,8 @@ ErrorCode Router::send(MeshPacket *p)
if (p->which_payload_variant == MeshPacket_decoded_tag) { if (p->which_payload_variant == MeshPacket_decoded_tag) {
ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it
bool shouldActuallyEncrypt = true;
#if HAS_WIFI || HAS_ETHERNET #if HAS_WIFI || HAS_ETHERNET
if(moduleConfig.mqtt.enabled) { if(moduleConfig.mqtt.enabled) {
// check if we should send decrypted packets to mqtt // check if we should send decrypted packets to mqtt
@ -235,7 +237,6 @@ ErrorCode Router::send(MeshPacket *p)
* => so we only decrypt mqtt if they have a custom mqtt server AND mqtt_encryption_enabled is FALSE * => so we only decrypt mqtt if they have a custom mqtt server AND mqtt_encryption_enabled is FALSE
*/ */
bool shouldActuallyEncrypt = true;
if (*moduleConfig.mqtt.address && !moduleConfig.mqtt.encryption_enabled) { if (*moduleConfig.mqtt.address && !moduleConfig.mqtt.encryption_enabled) {
shouldActuallyEncrypt = false; shouldActuallyEncrypt = false;
} }