Esempio n. 1
0
/*****************************************************************************
 Function Name  : IMSA_UsimMsgDistr()
 Description    : USIM消息分发函数
 Input          : VOS_VOID *pRcvMsg
 Output         : VOS_VOID
 Return Value   : VOS_VOID

 History        :
      1.sunbing 49683      2013-06-20  Draft Enact
*****************************************************************************/
VOS_VOID IMSA_UsimMsgDistr(const VOS_VOID *pRcvMsg )
{
    /* 定义消息头指针*/
    PS_MSG_HEADER_STRU          *pHeader = VOS_NULL_PTR;
    IMSA_CONTROL_MANAGER_STRU   *pstControlManager = IMSA_GetControlManagerAddress();

    /* 获取消息头指针*/
    pHeader = (PS_MSG_HEADER_STRU *) pRcvMsg;

    /* 关机过程中收到USIM发送的消息,直接丢弃 */
    if(IMSA_STATUS_STOPING == pstControlManager->enImsaStatus)
    {
        IMSA_WARN_LOG("IMSA_UsimMsgDistr: Status is Stoping!");
        return;
    }

    switch(pHeader->ulMsgName)
    {
        /*读文件结果*/
        case PS_USIM_GET_FILE_RSP:
            (VOS_VOID)IMSA_ProcReadIsimFileResult((VOS_VOID*)pRcvMsg);
            break;

        /*鉴权结果*/
        case PS_USIM_AUTHENTICATION_CNF:
            IMSA_ProcIsimAuthRsp(pRcvMsg);
            break;

        default:
            IMSA_ERR_LOG("IMSA_UsimMsgDistr: Msg id is err.");
            break;

    }
}
/*****************************************************************************
 Function Name  : IMSA_UsimMsgDistr()
 Description    : USIM消息分发函数
 Input          : VOS_VOID *pRcvMsg
 Output         : VOS_VOID
 Return Value   : VOS_VOID

 History        :
      1.sunbing 49683      2013-06-20  Draft Enact
*****************************************************************************/
VOS_VOID IMSA_UsimMsgDistr(const VOS_VOID *pRcvMsg )
{
    /* 定义消息头指针*/
    PS_MSG_HEADER_STRU          *pHeader = VOS_NULL_PTR;

    /* 获取消息头指针*/
    pHeader = (PS_MSG_HEADER_STRU *) pRcvMsg;

    switch(pHeader->ulMsgName)
    {
        /*读文件结果*/
        case PS_USIM_GET_FILE_RSP:
            (VOS_VOID)IMSA_ProcReadIsimFileResult((VOS_VOID*)pRcvMsg);
            break;

        /*鉴权结果*/
        case PS_USIM_AUTHENTICATION_CNF:
            IMSA_ProcIsimAuthRsp(pRcvMsg);
            break;

        default:
            IMSA_ERR_LOG("IMSA_UsimMsgDistr: Msg id is err.");
            break;

    }
}