mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-20 16:56:17 +00:00
Combine validDecode if statement.
This commit is contained in:
parent
af5a6e82a1
commit
de628f5649
@ -56,11 +56,7 @@ struct DecodedServiceEnvelope : public meshtastic_ServiceEnvelope {
|
||||
inline void onReceiveProto(char *topic, byte *payload, size_t length)
|
||||
{
|
||||
const DecodedServiceEnvelope e(payload, length);
|
||||
if (!e.validDecode) {
|
||||
LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!", topic, length);
|
||||
return;
|
||||
}
|
||||
if (e.channel_id == NULL || e.gateway_id == NULL || e.packet == NULL) {
|
||||
if (!e.validDecode || e.channel_id == NULL || e.gateway_id == NULL || e.packet == NULL) {
|
||||
LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!", topic, length);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user