VOS_VOID NAS_EMM_SER_AbnormalOver(VOS_VOID)
{
    NAS_EMM_SER_LOG_INFO( "NAS_EMM_SER_AbnormalOver is entered.");

    /*停止T3417定时器*/
    NAS_LMM_StopStateTimer(TI_NAS_EMM_STATE_SERVICE_T3417);

    /*停止T3440定时器*/
    NAS_LMM_StopStateTimer(TI_NAS_EMM_STATE_T3440);

    /*停止T3417ext定时器*/
    NAS_LMM_StopStateTimer(TI_NAS_EMM_STATE_SERVICE_T3417_EXT);

    /*如果SR流程是由于SMS触发,需要回复SMS建链失败,并且清除SR的发起原因,*/
    if(NAS_EMM_SER_START_CAUSE_SMS_EST_REQ == NAS_EMM_SER_GetSerStartCause())
    {
        /* SER异常的原因值上报暂时报LMM_SMS_ERR_CAUSE_OTHERS,
           以后可能要根据相应的原因值进行具体细分处理,上报准确的原因值
           此处作为遗留问题 */
        NAS_LMM_SndLmmSmsErrInd(LMM_SMS_ERR_CAUSE_OTHERS);
        NAS_EMM_SER_SaveEmmSERStartCause(NAS_EMM_SER_START_CAUSE_BUTT);
    }

    if (VOS_TRUE != NAS_EMM_SER_IsCsfbProcedure())
    {
        /*Inform RABM that SER fail*/
         NAS_EMM_SER_SendRabmReestInd(EMM_ERABM_REEST_STATE_FAIL);
    }

    /*清空ESM_DATA缓存*/
    NAS_EMM_SerClearEsmDataBuf();

    return;
}
Exemple #2
0
VOS_UINT32  NAS_EMM_PreProcMsgCsSerNotification
(
    NAS_EMM_CN_MSG_STRU_UNION          *pCnMsg
)
{
    VOS_UINT32                          ulCurEmmStat = NAS_EMM_NULL;
    NAS_EMM_CN_CS_SER_NOTIFICAIOTN_STRU *pstCsSerNotification = VOS_NULL_PTR;

    NAS_EMM_PUBU_LOG_NORM("NAS_EMM_PreProcMsgCsSerNotification is entered");

    pstCsSerNotification = (NAS_EMM_CN_CS_SER_NOTIFICAIOTN_STRU *)pCnMsg;

    ulCurEmmStat = NAS_LMM_PUB_COMP_EMMSTATE(NAS_EMM_CUR_MAIN_STAT,
                                            NAS_EMM_CUR_SUB_STAT);

    switch(ulCurEmmStat)
    {
        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_REG,EMM_SS_REG_NORMAL_SERVICE):
        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_RRC_CONN_REL_INIT,EMM_SS_RRC_CONN_WAIT_REL_CNF):
        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_AUTH_INIT,EMM_SS_AUTH_WAIT_CN_AUTH):
        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_TAU_INIT,EMM_SS_TAU_WAIT_CN_TAU_CNF):
                /* 进入该分支的肯定是MT类型的CSFB */
                if (NAS_EMM_FAIL == NAS_EMM_SER_VerifyCsfb(MM_LMM_CSFB_SERVICE_MT_NORMAL))
                {
                    /* 设置UE拒绝CSFB */
                    NAS_EMM_SER_SaveEmmSerCsfbRsp(NAS_EMM_CSFB_RSP_REJECTED_BY_UE);
                    NAS_EMM_SER_SaveEmmSERStartCause(NAS_EMM_SER_START_CAUSE_MT_CSFB_REQ);

                    /* 发送EXTENDED SERVICE REQ消息,通知网侧CSFB不能发起 */
                    NAS_EMM_SER_SendMrrcDataReq_ExtendedServiceReq();
                }
                else
                {
                    /* 给MM模块发送MM_MM_CSFB_SERVICE_PAGING_IND消息 */
                    NAS_EMM_MmSendCsfbSerPaingInd(  NAS_EMM_MT_CSFB_TYPE_CS_SER_NOTIFICATION,
                                                    pstCsSerNotification,
                                                    LRRC_PAGE_UE_ID_BUTT);
                }

                break;
        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_SER_INIT,EMM_SS_SER_WAIT_CN_SER_CNF):

                /*处于主叫过程中,收到被叫,则直接丢弃,被叫过程中收到CS SERVICE NOTIFICATION消息可能是重发,需要重新发起ESR*/
                if ((NAS_EMM_SER_START_CAUSE_MO_CSFB_REQ != NAS_EMM_SER_GetEmmSERStartCause())
                    && (NAS_EMM_SER_START_CAUSE_MO_EMERGENCY_CSFB_REQ != NAS_EMM_SER_GetEmmSERStartCause()))
                {

                    if (NAS_EMM_FAIL == NAS_EMM_SER_VerifyCsfb(MM_LMM_CSFB_SERVICE_MT_NORMAL))
                    {
                        /* 设置UE拒绝CSFB */
                        NAS_EMM_SER_SaveEmmSerCsfbRsp(NAS_EMM_CSFB_RSP_REJECTED_BY_UE);
                        NAS_EMM_SER_SaveEmmSERStartCause(NAS_EMM_SER_START_CAUSE_MT_CSFB_REQ);

                        /* 发送EXTENDED SERVICE REQ消息,通知网侧CSFB不能发起 */
                        NAS_EMM_SER_SendMrrcDataReq_ExtendedServiceReq();
                    }
                    else
                    {
                        /* 给MM模块发送MM_MM_CSFB_SERVICE_PAGING_IND消息 */
                        NAS_EMM_MmSendCsfbSerPaingInd(  NAS_EMM_MT_CSFB_TYPE_CS_SER_NOTIFICATION,
                                                        pstCsSerNotification,
                                                        LRRC_PAGE_UE_ID_BUTT);
                    }
                }
                break;

        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_REG,EMM_SS_REG_IMSI_DETACH_WATI_CN_DETACH_CNF):
        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_REG,EMM_SS_REG_ATTEMPTING_TO_UPDATE_MM):
        case    NAS_LMM_PUB_COMP_EMMSTATE(EMM_MS_DEREG_INIT,EMM_SS_DETACH_WAIT_CN_DETACH_CNF):

                /* 设置UE拒绝CSFB */
                NAS_EMM_SER_SaveEmmSerCsfbRsp(NAS_EMM_CSFB_RSP_REJECTED_BY_UE);
                NAS_EMM_SER_SaveEmmSERStartCause(NAS_EMM_SER_START_CAUSE_MT_CSFB_REQ);

                /* 发送EXTENDED SERVICE REQ消息,通知网侧CSFB不能发起 */
                NAS_EMM_SER_SendMrrcDataReq_ExtendedServiceReq();
                break;

        default :

                NAS_EMM_PUBU_LOG_NORM("NAS_EMM_PreProcMsgCsSerNotification:Illegal state!");
                break;
    }

    return NAS_LMM_MSG_HANDLED;
}