pull/3126/head^2
Manuel 2024-01-24 21:01:50 +01:00 zatwierdzone przez GitHub
rodzic 4ae5443c3b
commit f2c04c5504
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -131,7 +131,10 @@ void MQTT::onReceive(char *topic, byte *payload, size_t length)
}
delete json_value;
} else {
if (!pb_decode_from_bytes(payload, length, &meshtastic_ServiceEnvelope_msg, &e)) {
if (length == 0) {
LOG_WARN("Empty MQTT payload received, topic %s!\n", topic);
return;
} else if (!pb_decode_from_bytes(payload, length, &meshtastic_ServiceEnvelope_msg, &e)) {
LOG_ERROR("Invalid MQTT service envelope, topic %s, len %u!\n", topic, length);
return;
} else {