From f6decc013146a865438467d2066e3ba7b01e4298 Mon Sep 17 00:00:00 2001 From: Kimmo Vaisanen Date: Tue, 27 Mar 2018 12:32:32 +0300 Subject: [PATCH] Initialize mcps_indication status _mcps_indication.status is not initialized properly and it can cause incorrect status value to be returned. --- features/lorawan/lorastack/mac/LoRaMac.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/features/lorawan/lorastack/mac/LoRaMac.cpp b/features/lorawan/lorastack/mac/LoRaMac.cpp index 38a039e32c..013ea0c899 100644 --- a/features/lorawan/lorastack/mac/LoRaMac.cpp +++ b/features/lorawan/lorastack/mac/LoRaMac.cpp @@ -292,6 +292,7 @@ void LoRaMac::on_radio_rx_done(uint8_t *payload, uint16_t size, int16_t rssi, _mcps_indication.is_ack_recvd = false; _mcps_indication.dl_frame_counter = 0; _mcps_indication.type = MCPS_UNCONFIRMED; + _mcps_indication.status = LORAMAC_EVENT_INFO_STATUS_OK; if (_device_class != CLASS_C) { _lora_phy.put_radio_to_sleep();