mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 01:04:01 +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)
|
inline void onReceiveProto(char *topic, byte *payload, size_t length)
|
||||||
{
|
{
|
||||||
const DecodedServiceEnvelope e(payload, length);
|
const DecodedServiceEnvelope e(payload, length);
|
||||||
if (!e.validDecode) {
|
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;
|
|
||||||
}
|
|
||||||
if (e.channel_id == NULL || e.gateway_id == NULL || e.packet == NULL) {
|
|
||||||
LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!", topic, length);
|
LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!", topic, length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user