diff --git a/lexicon.txt b/lexicon.txt index dfe99513..e67044d8 100644 --- a/lexicon.txt +++ b/lexicon.txt @@ -147,6 +147,7 @@ checkcrsmreadstatus checklibrarystatus chk ci +cid ciev clearbits closedcallback diff --git a/source/cellular_3gpp_api.c b/source/cellular_3gpp_api.c index c668f149..4247bd32 100644 --- a/source/cellular_3gpp_api.c +++ b/source/cellular_3gpp_api.c @@ -1210,25 +1210,19 @@ static CellularPktStatus_t _Cellular_RecvFuncIpAddress( CellularContext_t * pCon if( atCoreStatus == CELLULAR_AT_SUCCESS ) { - LogDebug( ( "Recv IP address: Context id: %s", pToken ) ); + LogDebug( ( "Recv IP address: Context id: %s, Address %s", pToken, pInputLine ) ); if( pInputLine[ 0 ] != '\0' ) { - atCoreStatus = Cellular_ATGetNextTok( &pInputLine, &pToken ); + ( void ) strncpy( pData, pInputLine, dataLen ); } else { - /* This is the case "+CGPADDR: 1". Return "0.0.0.0" in this case.*/ - ( void ) strncpy( pData, "0,0,0,0", dataLen ); + /* This is the case "+CGPADDR: ". Return empty string. */ + ( void ) memset( pData, 0, dataLen ); } } - if( atCoreStatus == CELLULAR_AT_SUCCESS ) - { - LogDebug( ( "Recv IP address: Ip Addr: %s", pToken ) ); - ( void ) strncpy( pData, pToken, dataLen ); - } - pktStatus = _Cellular_TranslateAtCoreStatus( atCoreStatus ); }