[SX1276, LoRaWAN] Fix confusing return value in LoRaWAN::processJoinAccept (#1262)

The error RADIOLIB_ERR_LORA_HEADER_DAMAGED board returned fromreadData(...)
and signaled from a SX1276 is in fact correctly ignored but the state
variable is not corrected.

This confuses the caller due to the wrongly returned state value
RADIOLIB_ERR_LORA_HEADER_DAMAGED.

Change: Clear state also.
pull/1267/head
Volker Christian 2024-10-09 20:32:50 +02:00 zatwierdzone przez GitHub
rodzic bce4d91715
commit a7feeee1e0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -688,6 +688,8 @@ int16_t LoRaWANNode::processJoinAccept(LoRaWANJoinEvent_t *joinEvent) {
// we can ignore that error
if(state != RADIOLIB_ERR_LORA_HEADER_DAMAGED) {
RADIOLIB_ASSERT(state);
} else {
state = RADIOLIB_ERR_NONE;
}
// check reply message type