FreeRTOS / FreeRTOS-Cellular-Interface

FreeRTOS Cellular Interface implementation of the 3GPP TS v27.007 standard.
MIT License
85 stars 59 forks source link

Update Cellular_CommonInit error handling #163

Closed chinglee-iot closed 9 months ago

chinglee-iot commented 9 months ago

Description

This PR address the problem reported in forum.

In this PR

Test Steps

Before this PR, the following test code will have cellular context leakage.

cellularStatus = Cellular_Init( &pCellularHandle, pCommInterface );

cellularStatus is not CELLULAR_SUCCESS due to any one of the following function returns error

cellularStatus = Cellular_ModuleInit( pContext, &pContext->pModuleContext );
cellularStatus = Cellular_ModuleEnableUE( pContext );
cellularStatus = Cellular_ModuleEnableUrc( pContext );

Checklist:

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.