{
switch(pst->event)
{
- case EVTSTRTPOLL:
+ case EVTSTARTPOLL:
{
sctpSockPoll();
break;
SExitTsk();
return ROK;
}
+/*******************************************************************
+ *
+ * @brief Checks the status of the received information
+ *
+ * @details
+ *
+ * Function : duCheckReqStatus
+ *
+ * Functionality:
+ * Checks the status of the received information
+ *
+ * @params[in] Confirm status
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ ******************************************************************/
+S16 duCheckReqStatus(CmStatus *cfm)
+{
+ S16 ret = ROK;
+ if(cfm->status != LCM_PRIM_OK)
+ {
+ DU_LOG("\nDU_APP : Failed to process the request successfully");
+ ret = RFAILED;
+ }
+ RETVALUE(ret);
+}
/**************************************************************************
* @brief Function to configure the Sctp Params during config Request
*
***************************************************************************/
-S16 duSctpCfgReq(SctpParams sctpCfg, CmStatus *cfm)
+S16 duSctpCfgReq(SctpParams sctpCfg)
{
+ S16 ret = ROK;
+ CmStatus cfm;
+
/* Fill F1 Params */
f1Params.destIpAddr.ipV4Pres = sctpCfg.cuIpAddr.ipV4Pres;
f1Params.destIpAddr.ipV4Addr = sctpCfg.cuIpAddr.ipV4Addr;
f1Params.destPort = sctpCfg.cuPort;
f1Params.itfState = DU_SCTP_DOWN;
- f1Params.srcPort = sctpCfg.duPort[0];
- f1Params.recvMsgSet = ROK;
+ f1Params.srcPort = sctpCfg.duPort[F1_INTERFACE];
+ f1Params.recvMsgSet = ROK;
cmMemset ((U8 *)&f1Params.sockFd, -1, sizeof(CmInetFd));
fillDestNetAddr(&f1Params.destIpNetAddr, &f1Params.destIpAddr);
fillAddrLst(&f1Params.destAddrLst, &f1Params.destIpAddr);
ricParams.destIpAddr.ipV4Addr = sctpCfg.ricIpAddr.ipV4Addr;
ricParams.destPort = sctpCfg.ricPort;
ricParams.itfState = DU_SCTP_DOWN;
- ricParams.srcPort = sctpCfg.duPort[1];
- ricParams.recvMsgSet = ROK;
+ ricParams.srcPort = sctpCfg.duPort[E2_INTERFACE];
+ ricParams.recvMsgSet = ROK;
cmMemset ((U8 *)&ricParams.sockFd, -1, sizeof(CmInetFd));
fillDestNetAddr(&ricParams.destIpNetAddr, &ricParams.destIpAddr);
fillAddrLst(&ricParams.destAddrLst, &ricParams.destIpAddr);
pollingState = FALSE;
/* Fill Cfm Status */
- cfm->status = LCM_PRIM_OK;
- cfm->reason = LCM_REASON_NOT_APPL;
+ cfm.status = LCM_PRIM_OK;
+ cfm.reason = LCM_REASON_NOT_APPL;
- RETVALUE(ROK);
+ ret = duCheckReqStatus(&cfm);
+
+ RETVALUE(ret);
}
/*******************************************************************
paramPtr->itfState = DU_SCTP_UP;
}
- /* Post the EVTSTRTPOLL Msg */
+ /* Post the EVTSTARTPOLL Msg */
if(!pollingState)
{
pollingState = TRUE;
- duFillSctpPst(&pst, EVTSTRTPOLL);
+ duFillSctpPst(&pst, EVTSTARTPOLL);
}
RETVALUE(ret);
*
*******************************************************************************/
-S16 duSctpAssocReq(U8 itfType, CmStatus *cfm)
+S16 duSctpAssocReq(U8 itfType)
{
S16 ret = ROK;
+ CmStatus cfm;
DuSctpDestCb *paramPtr = NULLP;
+
if(SGetSBuf(DU_APP_MEM_REGION, DU_POOL, (Data **)¶mPtr, (Size)sizeof(DuSctpDestCb)) != ROK)
{
printf("\nDU_APP : Failed to allocate memory");
if(ret != ROK)
{
DU_LOG("\nSCTP : ASSOC Req Failed.");
- cfm->status = LCM_PRIM_NOK;
- cfm->reason = LCM_REASON_NOT_APPL;
+ cfm.status = LCM_PRIM_NOK;
+ cfm.reason = LCM_REASON_NOT_APPL;
}
else
{
- cfm->status = LCM_PRIM_OK;
- cfm->reason = LCM_REASON_NOT_APPL;
+ cfm.status = LCM_PRIM_OK;
+ cfm.reason = LCM_REASON_NOT_APPL;
}
+ ret = duCheckReqStatus(&cfm);
RETVALUE(ret);
}