Kampi / ESP32-RAK3172

LoRaWAN / LoRa P2P library for ESP32 MCUs and the RAK3172 LoRa SoM.
https://www.kampis-elektroecke.de
MIT License
18 stars 4 forks source link

Infinite Recursion Error in RAK3172_LoRaWAN_Transmit #19

Closed txf- closed 1 month ago

txf- commented 1 month ago

in rak3172_lorawan.cpp line 328, I got a compilation error complaining about infinite recursion:

RAK3172_Error_t RAK3172_LoRaWAN_Transmit(RAK3172_t& p_Device, uint8_t Port, const uint8_t* const p_Buffer, uint16_t Length, uint8_t Retries)
{
    return RAK3172_LoRaWAN_Transmit(p_Device, Port, p_Buffer, Length, Retries);
}

I assume this overload is supposed to call the version of the function with more parameters, so I changed it, would this be correct?

RAK3172_Error_t RAK3172_LoRaWAN_Transmit(RAK3172_t& p_Device, uint8_t Port, const uint8_t* const p_Buffer, uint16_t Length, uint8_t Retries)
{
    return RAK3172_LoRaWAN_Transmit(p_Device, Port, p_Buffer, Length, Retries,false,nullptr);
}

Setting a default of unconfirmed and no callback? The header file already has defaults for the optional parameters, is this overload even necessary?

Kampi commented 1 month ago

Hi @txf-,

this issue is solved in the 4.2 branch. Can you check it please?

txf- commented 1 month ago

Yes, this issue is not present in 4.2