VOS_UINT32 NAS_UTRANCTRL_RestoreContextData_Main( VOS_UINT32 ulEventType, struct MsgCB *pstMsg ) { NAS_UTRANCTRL_CTX_STRU *pstUtranCtrlCtx; NAS_MML_PC_REPLAY_COMPRESS_CONTEXT_STRU *pstRcMsg; VOS_UINT32 ulExpectCount; VOS_UINT32 ulCount; VOS_UINT32 ulItemCount; VOS_UINT8 *pucDest; VOS_UINT8 *pucSrc; VOS_UINT32 ulDestLen; pstUtranCtrlCtx = NAS_UTRANCTRL_GetUtranCtrlCtx(); ulExpectCount = 0; ulCount = 0; ulItemCount = 0; ulExpectCount = sizeof(NAS_UTRANCTRL_CTX_STRU); /*注册状态机*/ NAS_UTRANCTRL_RegFsm(); pstRcMsg = (NAS_MML_PC_REPLAY_COMPRESS_CONTEXT_STRU *)pstMsg; pucSrc = pstRcMsg->aucData; /* 解析总长度 */ PS_MEM_CPY(&ulCount, pucSrc, sizeof(VOS_UINT32)); pucSrc += sizeof(VOS_UINT32); if( ulExpectCount != ulCount ) { return VOS_FALSE; } /* g_stNasUtranCtrlCtx目标地址 */ pucDest = (VOS_UINT8 *)pstUtranCtrlCtx; ulDestLen = sizeof(NAS_UTRANCTRL_CTX_STRU); /* 解压缩 */ if (VOS_FALSE == NAS_MML_UnCompressData(pucDest, &ulDestLen, pucSrc, &ulItemCount) ) { return VOS_FALSE; } pucSrc += (ulItemCount); NAS_UTRANCTRL_ReloadFsmDesc(NAS_UTRANCTRL_GetCurFsmAddr(), pstUtranCtrlCtx->stCurFsm.enFsmId); NAS_INFO_LOG(WUEPS_PID_MMC, "UTRANCTRL: NAS_UTRANCTRL_RestoreContextData_Main - data is restored."); return VOS_TRUE; }
VOS_VOID NAS_SMS_RcvOmInquireReq( struct MsgCB *pstMsg ) { ID_NAS_OM_INQUIRE_STRU *pstOmMsg = VOS_NULL_PTR; pstOmMsg = (ID_NAS_OM_INQUIRE_STRU *)pstMsg; NAS_INFO_LOG(WUEPS_PID_SMS, "NAS_SMS_RcvOmInquireReq: "); NAS_SMS_SndOmInquireCnfMsg(pstOmMsg); return; }
NAS_MML_INTERNAL_MSG_BUF_STRU* NAS_MML_GetNextInternalMsg( VOS_VOID ) { NAS_MML_INTERNAL_MSG_BUF_STRU *pstNextMsg = VOS_NULL_PTR; VOS_UINT8 ucNextIndex; NAS_MML_CTX_STRU *pstMmlCtx = VOS_NULL_PTR; pstMmlCtx = NAS_MML_GetMmlCtx(); if ( pstMmlCtx->stInternalMsgQueue.ucHeader != pstMmlCtx->stInternalMsgQueue.ucTail) { ucNextIndex = pstMmlCtx->stInternalMsgQueue.ucHeader; pstNextMsg = (NAS_MML_INTERNAL_MSG_BUF_STRU *)&(pstMmlCtx->stInternalMsgQueue.astNasMmMsgQueue[ucNextIndex]); /* 取完一条消息,头指针向后偏移 */ (pstMmlCtx->stInternalMsgQueue.ucHeader)++; (pstMmlCtx->stInternalMsgQueue.ucHeader) %= NAS_MML_MAX_MSG_QUEUE_SIZE; return pstNextMsg; } NAS_INFO_LOG(WUEPS_PID_MM, "NAS_MML_GetNextInternalMsg:Empty Internal Msg"); return VOS_NULL_PTR; }
VOS_VOID NAS_MML_MsgProc( struct MsgCB *pRcvMsg ) { NAS_MML_INTERNAL_MSG_BUF_STRU *pstNextMsg = VOS_NULL_PTR; pNasMmPIdMsgProc pMsgProc = VOS_NULL_PTR; MSG_HEADER_STRU *pstMsgHeader = VOS_NULL_PTR; #ifndef __PS_WIN32_RECUR__ VOS_UINT32 ulIsSndOmPcRecurMsgValid; #endif VOS_UINT32 ulRslt; struct MsgCB *pstNextDestMsg; /* 入口参数检查 */ if ( VOS_NULL_PTR == pRcvMsg ) { NAS_ERROR_LOG(WUEPS_PID_MMC, "NAS_MML_MsgProc:Empty Msg"); return; } if (VOS_TRUE == NAS_MML_GetSvlteSupportFlag()) { NAS_MML_ConvertOamSendPid(&pRcvMsg->ulSenderPid); } pMsgProc = NAS_MML_FindPidMsgProc(pRcvMsg->ulReceiverPid); /* 未找到处理函数直接返回 */ if ( VOS_NULL_PTR == pMsgProc ) { NAS_ERROR_LOG(WUEPS_PID_MMC, "NAS_MML_MsgProc:Invalid rcv pid"); return; } /* 先处理外部消息 */ pMsgProc(pRcvMsg); /* 外部消息处理完成后处理内部消息 */ pstNextMsg = NAS_MML_GetNextInternalMsg(); while (VOS_NULL_PTR != pstNextMsg) { #if (FEATURE_ON == FEATURE_LTE) if (PS_PID_MM == pstNextMsg->ulSenderPid) { pstMsgHeader = (MSG_HEADER_STRU *)pstNextMsg; NAS_MML_LogMsgInfo(pstMsgHeader); } #endif pMsgProc = NAS_MML_FindPidMsgProc(pstNextMsg->ulReceiverPid); /* 未找到处理函数直接返回 */ if ( VOS_NULL_PTR == pMsgProc ) { NAS_ERROR_LOG(WUEPS_PID_MMC, "NAS_MML_MsgProc:Invalid rcv pid"); } #if (FEATURE_ON == FEATURE_LTE) else if ((VOS_FALSE == NAS_MML_IsPlatformSupportLte()) && (PS_PID_MM == pstNextMsg->ulReceiverPid)) { NAS_INFO_LOG(WUEPS_PID_MMC, "NAS_MML_MsgProc:Platform not support Lte"); } #endif else { /* 将该消息钩出来,以便于在PSTAS中显示 */ DIAG_TraceReport(pstNextMsg); /* 将当前消息进入UTRANCTRL模块进行处理 */ ulRslt = NAS_UTRANCTRL_MsgProc((struct MsgCB *)pstNextMsg, &pstNextDestMsg); /* 消息在UTRANCTRL模块处理完成,直接返回,不进入后续处理 */ if ( VOS_FALSE == ulRslt ) { pMsgProc((struct MsgCB *)pstNextDestMsg); } } /* 寻找下一条内部消息 */ pstNextMsg = NAS_MML_GetNextInternalMsg(); } #ifndef __PS_WIN32_RECUR__ ulIsSndOmPcRecurMsgValid = NAS_MML_IsSndOmPcRecurMsgValid(); if ( (VOS_TRUE == NAS_MML_GetUePcRecurFlg()) && (VOS_TRUE == ulIsSndOmPcRecurMsgValid)) { NAS_MML_SetUePcRecurFlg(VOS_FALSE); NAS_MMC_SndOutsideContextData(); NAS_MM_SndOutsideContextData(); NAS_GMM_SndOutsideContextData(); } #endif return; }