Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cellular_CommonInit error handling #163

Merged
merged 3 commits into from
Jan 31, 2024

Conversation

chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented Jan 30, 2024

Description

This PR address the problem reported in forum.

In this PR

  • Update Cellular_CommonInit error handling to clean up the cellular interface library if modem port function returns error.

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:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

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.

@chinglee-iot chinglee-iot requested a review from ActoryOu January 30, 2024 07:38
ActoryOu
ActoryOu previously approved these changes Jan 30, 2024
@chinglee-iot chinglee-iot merged commit df553bd into FreeRTOS:main Jan 31, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants