properly send release complete

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@254 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2007-06-14 02:02:56 +00:00
parent d26289fc92
commit 06c9547078
3 changed files with 12 additions and 18 deletions

View File

@ -761,17 +761,12 @@ L3INT Q931ProcReleaseTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
Q931mes_Generic *pMes = (Q931mes_Generic *)&buf[Q931L4HeaderSpace];
L3INT state = Q931GetCallState(pTrunk, pMes->CRV);
L3INT ret = Q931E_NO_ERROR;
if(iFrom == 4)
{
/* TODO Add proc here*/
ret = Q931Tx32(pTrunk,buf,pMes->Size);
}
else if(state == Q931_U0 && iFrom == 2)
{
ret = Q931ReleaseComplete(pTrunk, iFrom);
}
else
{
if(iFrom == 4) {
/* TODO Add proc here*/
ret = Q931Tx32(pTrunk,buf,pMes->Size);
} else if(state == Q931_U0 && iFrom == 2) {
ret = Q931ReleaseComplete(pTrunk, buf);
} else {
ret = Q931ProcUnexpectedMessage(pTrunk, buf, iFrom);
}

View File

@ -515,13 +515,12 @@ L3INT Q931Disconnect(Q931_TrunkInfo_t *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCau
return 0;
}
L3INT Q931ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3INT iTo)
L3INT Q931ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *buf)
{
/* TODO: Unhandled paramaters */
(void)pTrunk;
(void)iTo;
Q931mes_Header *ptr = (Q931mes_Header*)&buf[Q931L4HeaderSpace];
ptr->MesType = Q931mes_RESTART_ACKNOWLEDGE;
return 0;
return Q931Tx32(pTrunk,buf,ptr->Size);
}
L3INT Q931AckRestart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *buf)
@ -529,7 +528,7 @@ L3INT Q931AckRestart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *buf)
L3INT RetCode;
Q931mes_Header *ptr = (Q931mes_Header*)&buf[Q931L4HeaderSpace];
ptr->MesType = Q931mes_RESTART_ACKNOWLEDGE;
ptr->MesType = Q931mes_RELEASE_COMPLETE;
RetCode = Q931Proc[pTrunk->Dialect][ptr->MesType](pTrunk, buf, 4);

View File

@ -938,7 +938,7 @@ L3INT Q931InitIELLComp(Q931ie_LLComp * pIE);
L3INT Q931InitIEHLComp(Q931ie_HLComp * pIE);
L3INT Q931Disconnect(Q931_TrunkInfo_t *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCause);
L3INT Q931ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3INT iTo);
L3INT Q931ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *buf);
L3INT Q931AckRestart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *buf);
L3INT Q931AckConnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *buf);
L3INT Q931AckSetup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *buf);