Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions source/cellular_3gpp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ static CellularPktStatus_t _Cellular_RecvFuncGetNetworkReg( CellularContext_t *
CellularATError_t atCoreStatus = CELLULAR_AT_SUCCESS;
CellularNetworkRegType_t regType = CELLULAR_REG_TYPE_UNKNOWN;
CellularATCommandLine_t * pCommandLine = NULL;
bool isUrc = false;

if( pContext == NULL )
{
Expand Down Expand Up @@ -823,20 +824,15 @@ static CellularPktStatus_t _Cellular_RecvFuncGetNetworkReg( CellularContext_t *
/* Assumption is that the data is null terminated so we don't need the dataLen. */
_Cellular_LockAtDataMutex( pContext );

if( regResponseIsUrc( pPregLine ) == true )
{
/* Remove the prefix for URC handler. */
atCoreStatus = Cellular_ATRemovePrefix( &pPregLine );
pktStatus = _Cellular_TranslateAtCoreStatus( atCoreStatus );
isUrc = regResponseIsUrc( pPregLine );

if( pktStatus == CELLULAR_PKT_STATUS_OK )
{
pktStatus = _Cellular_ParseRegStatus( pContext, pPregLine, true, regType );
}
}
else
/* Remove the prefix for URC handler. */
atCoreStatus = Cellular_ATRemovePrefix( &pPregLine );
pktStatus = _Cellular_TranslateAtCoreStatus( atCoreStatus );

if( pktStatus == CELLULAR_PKT_STATUS_OK )
{
pktStatus = _Cellular_ParseRegStatus( pContext, pPregLine, false, regType );
pktStatus = _Cellular_ParseRegStatus( pContext, pPregLine, isUrc, regType );
}

_Cellular_UnlockAtDataMutex( pContext );
Expand Down Expand Up @@ -2132,6 +2128,8 @@ void _Cellular_InitAtData( CellularContext_t * pContext,
pLibAtData->cellId = 0xFFFFFFFFU;
pLibAtData->rat = CELLULAR_RAT_INVALID;
pLibAtData->rac = 0xFF;
pLibAtData->periodicTauValue = 0xFFFFFFFFU;
pLibAtData->activeTimeValue = 0xFFFFFFFFU;
}

/*-----------------------------------------------------------*/
Expand Down
Loading