📄 ma_acc3.c
字号:
case 9:
/* invoke event structure is checked inside the maAccChkOprInd */
MAACCPRINT_TEST((prntBuf, "Check for OperInd - 3 on SAP 1\n"));
maAccCb.curTst.state++;
if (maAccChkOprInd(dstSap, dstDlgIdx, invId+2, oprCode) != ROK)
{
MAACCPRNERROR((prntBuf, "maAccTstClass13Inv: Chk Opr Ind failed\n"));
maAccCb.curTst.result = MA_TST_FAILED;
break;
}
/* operation response is sent before
getting Delimiter Indication */
break;
case 10:
MAACCPRINT_TEST((prntBuf, "Check for DelimInd on SAP 1\n"));
maAccCb.curTst.state++;
maAccChkDelimInd(dstSap, dstDlgIdx);
break;
/* Send Open Response on SAP_1 */
case 11:
/* Prepare the open event structure */
maAccCb.curTst.state++;
/*
MAACCPRINT_TEST((prntBuf, "Send OpenRsp on SAP 1\n"));
maAccSetOpenEvent(&openEv,
&maAccAddrs[MA_ACC_MAP_PEER],
&maAccAddrs[MA_ACC_MAP],
apn,FALSE,FALSE);
MAACCOPENRSP(dstSap, dstDlgIdx, &openEv);
*/
break;
/* Send Delimiter Request on SAP_1 */
case 12:
maAccCb.curTst.state++;
/*
MAACCPRINT_TEST((prntBuf, "Send DelimReq on SAP 1\n"));
openCfm = FALSE;
MAACCDELIMREQ(dstSap, dstDlgIdx);
*/
break;
default:
MAACCPRNERROR((prntBuf, "maAccOpenDlgAndOper: Bad State Info Passed\n"));
maAccCb.curTst.result = MA_TST_FAILED;
break;
}
RETVOID;
} /* end of maAccOpenDlgAnd3Oper */
/*
*
* Fun: maAccOpenDlgAndOper
*
* Desc: It has two companion functions -
* maAccOpenDlgAndOperC, and maAccOpenDlgAndOperC1
*
* Ret: Void.
*
* Notes: None.
*
* File: ma_acc3.c
*
*/
#ifdef ANSI
PUBLIC Void maAccOpenDlgAndOper
(
U16 step,
U16 srcDlgIdx, /* source dialogue index */
U16 dstDlgIdx, /* destination dialogue index */
MaApConName *apn, /* Apn to send */
SpId srcSap,
SpId dstSap,
MaInvokeId *invId,
MaInvokeId *lnkInvId
)
#else
PUBLIC Void maAccOpenDlgAndOper(step, srcDlgIdx, dstDlgIdx,apn,srcSap,
dstSap, invId, lnkInvId)
U16 step;
U16 srcDlgIdx; /* source dialogue index */
U16 dstDlgIdx; /* destination dialogue index */
MaApConName *apn; /* Apn to send */
SpId srcSap;
SpId dstSap;
MaInvokeId *invId;
MaInvokeId *lnkInvId;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE]; /* buffer to print */
MaOpenEv openEv; /* open event structure */
MaOprType oprCode;
PTR invoke;
oprCode=MAT_UPLOC;
MAACC_FILL_MANDATORY;
TRC2(maAccOpenDlgAndOper)
switch(step)
{
/* Send Open Request on SAP_0 */
case 0:
/* Prepare the open event structure */
maAccFlushQ();
maAccFlushMsgQ();
MAACCPRINT_TEST((prntBuf, "Send OpenReq on SAP 0\n"));
maAccCb.curTst.state++;
maAccSetOpenEvent(&openEv,
&maAccAddrs[MA_ACC_MAP],
&maAccAddrs[MA_ACC_MAP_PEER],
apn,FALSE,FALSE);
MAACCOPENREQ(srcSap, srcDlgIdx, &openEv);
break;
/* Receive Dialogue Confirm on SAP_0 */
case 1:
MAACCPRINT_TEST((prntBuf, "Receive DlgCfm on SAP 0\n"));
maAccCb.curTst.state++;
maAccChkDlgCfm(srcSap, srcDlgIdx);
break;
case 2:
MAACCPRINT_TEST((prntBuf, "Send OprReq on SAP 0\n"));
maAccCb.curTst.state++;
invoke = (PTR )&maInvoke;
if (maAccSetInvoke(invoke, oprCode) != ROK)
{
MAACCPRNERROR((prntBuf, "failed to set Inv\n"));
maAccCb.curTst.result = MA_TST_FAILED;
break;
}
/* allocate an invoke Id for this operation */
if (maAccAllocInvokeId(invId) != ROK)
{
MAACCPRNERROR((prntBuf, "AllocInvokeId failed\n"));
maAccCb.curTst.result = MA_TST_FAILED;
break;
}
/* Now issue an operation request to MAP */
maAccOprReq(srcSap,
srcDlgIdx,
invId,
lnkInvId,
oprCode,
(PTR) invoke);
break;
/* Send Delimiter Request on SAP_0 */
case 3:
MAACCPRINT_TEST((prntBuf, "Send DelimReq on SAP 0\n"));
maAccCb.curTst.state++;
MAACCDELIMREQ(srcSap, srcDlgIdx);
break;
/* Receive Open Indication on SAP_1 */
case 4:
MAACCPRINT_TEST((prntBuf, "Receive OpenInd on SAP 1\n"));
maAccCb.curTst.state++;
maAccChkOpenInd(dstSap, dstDlgIdx, apn);
break;
case 5:
/* invoke event structure is checked inside the maAccChkOprInd */
MAACCPRINT_TEST((prntBuf, "Check for OperInd on SAP 1\n"));
maAccCb.curTst.state++;
if (maAccChkOprInd(dstSap, dstDlgIdx, invId, oprCode) != ROK)
{
MAACCPRNERROR((prntBuf, "maAccTstClass13Inv: Chk Opr Ind failed\n"));
maAccCb.curTst.result = MA_TST_FAILED;
break;
}
/* operation response is sent before
getting Delimiter Indication */
break;
case 6:
MAACCPRINT_TEST((prntBuf, "Check for DelimInd on SAP 1\n"));
maAccCb.curTst.state++;
maAccChkDelimInd(dstSap, dstDlgIdx);
break;
/* Send Open Response on SAP_1 */
case 7:
/* Prepare the open event structure */
maAccCb.curTst.state++;
/*
MAACCPRINT_TEST((prntBuf, "Send OpenRsp on SAP 1\n"));
maAccSetOpenEvent(&openEv,
&maAccAddrs[MA_ACC_MAP_PEER],
&maAccAddrs[MA_ACC_MAP],
apn,FALSE,FALSE);
MAACCOPENRSP(dstSap, dstDlgIdx, &openEv);
*/
break;
case 8:
maAccCb.curTst.state++;
break;
case 9:
maAccCb.curTst.state++;
break;
default:
MAACCPRNERROR((prntBuf, "maAccOpenDlgAndOper: Bad State Info Passed\n"));
maAccCb.curTst.result = MA_TST_FAILED;
break;
}
RETVOID;
} /* end of maAccOpenDlgAndOper */
/*
*
* Fun: maAccOpenDlgNewC
*
* Desc: Companion function
*
* Ret: Void.
*
* Notes: None.
*
* File: ma_acc3.c
*
*/
#ifdef ANSI
PUBLIC Void maAccOpenDlgNewC
(
U16 step,
U16 srcDlgIdx, /* source dialogue index */
U16 dstDlgIdx, /* destination dialogue index */
MaApConName *apn, /* Apn to send */
SpId srcSap,
SpId dstSap,
MaInvokeId *invId,
MaInvokeId *lnkInvId
)
#else
PUBLIC Void maAccOpenDlgNewC(step, srcDlgIdx, dstDlgIdx,apn,srcSap,
dstSap, invId, lnkInvId)
U16 step;
U16 srcDlgIdx; /* source dialogue index */
U16 dstDlgIdx; /* destination dialogue index */
MaApConName *apn; /* Apn to send */
SpId srcSap;
SpId dstSap;
MaInvokeId *invId;
MaInvokeId *lnkInvId;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE]; /* buffer to print */
MaOpenEv openEv; /* open event structure */
MaOprType oprCode;
MaCloseEv closeEv; /* close event structure */
oprCode=MAT_UPLOC;
MAACC_FILL_MANDATORY;
TRC2(maAccOpenDlgNewC)
switch(step)
{
/* Send Open Request on SAP_0 */
case 0:
/* Prepare the open event structure */
maAccFlushQ();
maAccFlushMsgQ();
MAACCPRINT_TEST((prntBuf, "Send OpenRsp on Sap 1\n"));
maAccCb.curTst.state++;
maAccSetOpenEvent(&openEv,
&maAccAddrs[MA_ACC_MAP_PEER],
&maAccAddrs[MA_ACC_MAP],
apn,FALSE,FALSE);
MAACCOPENRSP(dstSap, dstDlgIdx, &openEv);
break;
/* Send Delimiter Request on SAP_1 */
case 1:
MAACCPRINT_TEST((prntBuf, "Send DelimReq on SAP 1\n"));
maAccCb.curTst.state++;
MAACCDELIMREQ(dstSap, dstDlgIdx);
break;
/* Receive Open Confirm on SAP_0 */
case 2:
MAACCPRINT_TEST((prntBuf, "Check for OpenCfm on SAP 0\n"));
maAccCb.curTst.state++;
maAccChkOpenCfm(srcSap, srcDlgIdx, apn);
break;
/* Receive Delimiter Indication on SAP_0 */
case 3:
maAccCb.curTst.state++;
MAACCPRINT_TEST((prntBuf, "Check for DellimInd on SAP 0\n"));
maAccChkDelimInd(srcSap, srcDlgIdx);
break;
/* Send Close Request on SAP_1 */
case 4:
/* Prepare the close event structure */
maAccCb.curTst.state++;
MAACCPRINT_TEST((prntBuf, "Send CloseInd on SAP 1\n"));
cmZero((Data *) &closeEv, sizeof(MaCloseEv));
closeEv.rlsCause = MAT_NORMAL_RELEASE;
MAACCCLOSEREQ(dstSap, dstDlgIdx, &closeEv);
break;
/* Receive Close Indication on SAP_0 */
case 5:
maAccCb.curTst.state++;
MAACCPRINT_TEST((prntBuf, "Recv CloseInd on SAP 0\n"));
maAccChkCloseInd(srcSap, srcDlgIdx);
break;
default:
MAACCPRNERROR((prntBuf, "maAccOpenDlgAndOperC: Bad State Info Passed\n"));
maAccCb.curTst.result = MA_TST_FAILED;
break;
}
RETVOID;
} /* end of maAccOpenDlgNewC */
/*
*
* Fun: maAccOpenDlgAndOperC
*
* Desc: Companion function
*
* Ret: Void.
*
* Notes: None.
*
* File: ma_acc3.c
*
*/
#ifdef ANSI
PUBLIC Void maAccOpenDlgAndOperC
(
U16 step,
U16 srcDlgIdx, /* source dialogue index */
U16 dstDlgIdx, /* destination dialogue index */
MaApConName *apn, /* Apn to send */
SpId srcSap,
SpId dstSap,
MaInvokeId *invId,
MaInvokeId *lnkInvId
)
#else
PUBLIC Void maAccOpenDlgAndOperC(step, srcDlgIdx, dstDlgIdx,apn,srcSap,
dstSap, invId, lnkInvId)
U16 step;
U16 srcDlgIdx; /* source dialogue index */
U16 dstDlgIdx; /* destination dialogue index */
MaApConName *apn; /* Apn to send */
SpId srcSap;
SpId dstSap;
MaInvokeId *invId;
MaInvokeId *lnkInvId;
#endif
{
Txt prntBuf[MA_PRNTBUF_SIZE]; /* buffer to print */
MaOpenEv openEv; /* open event structure */
MaOprType oprCode;
MaCloseEv closeEv; /* close event structure */
MaUsrErr dstErr; /* operation error */
MaUsrErr *srcUsrErr; /* operation error */
MaPrvErr *srcPrvErr; /* operation error */
MaAllSSEv *srcEv; /* operation event */
oprCode=MAT_UPLOC;
MAACC_FILL_MANDATORY;
TRC2(maAccOpenDlgAndOperC)
switch(step)
{
/* Send Open Request on SAP_0 */
case 0:
/* Prepare the open event structure */
maAccFlushQ();
maAccFlushMsgQ();
MAACCPRINT_TEST((prntBuf, "Send OpenRsp on Sap 1\n"));
maAccCb.curTst.state++;
maAccSetOpenEvent(&openEv,
&maAccAddrs[MA_ACC_MAP_PEER],
&maAccAddrs[MA_ACC_MAP],
apn,FALSE,FALSE);
MAACCOPENRSP(dstSap, dstDlgIdx, &openEv);
break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -