add separate private data for tx to 2 and 4.
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@98 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
50aba550c9
commit
b06d0d2589
|
@ -351,7 +351,7 @@ L3INT Q931Rx23(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT Size)
|
|||
L3INT Q931Tx34(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size)
|
||||
{
|
||||
if (pTrunk->Q931Tx34CBProc) {
|
||||
return pTrunk->Q931Tx34CBProc(pTrunk->PrivateData, Mes, Size);
|
||||
return pTrunk->Q931Tx34CBProc(pTrunk->PrivateData34, Mes, Size);
|
||||
}
|
||||
return Q931E_MISSING_CB;
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ L3INT Q931Tx32(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size)
|
|||
if(RetCode >= Q931E_NO_ERROR)
|
||||
{
|
||||
if (pTrunk->Q931Tx32CBProc) {
|
||||
RetCode = pTrunk->Q931Tx32CBProc(pTrunk->PrivateData, pTrunk->L2Buf, Size);
|
||||
RetCode = pTrunk->Q931Tx32CBProc(pTrunk->PrivateData32, pTrunk->L2Buf, Size);
|
||||
} else {
|
||||
RetCode = Q931E_MISSING_CB;
|
||||
}
|
||||
|
@ -434,9 +434,9 @@ L3INT Q931Tx32(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size)
|
|||
void Q931SetError(Q931_TrunkInfo *pTrunk,L3INT ErrID, L3INT ErrPar1, L3INT ErrPar2)
|
||||
{
|
||||
if (pTrunk->Q931ErrorCBProc) {
|
||||
pTrunk->Q931ErrorCBProc(pTrunk->PrivateData, ErrID, ErrPar1, ErrPar2);
|
||||
pTrunk->Q931ErrorCBProc(pTrunk->PrivateData34, ErrID, ErrPar1, ErrPar2);
|
||||
} else {
|
||||
Q931ErrorProc(pTrunk->PrivateData, ErrID, ErrPar1, ErrPar2);
|
||||
Q931ErrorProc(pTrunk->PrivateData34, ErrID, ErrPar1, ErrPar2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,8 @@ L3INT Q931Api_InitTrunk(Q931_TrunkInfo *pTrunk,
|
|||
Q931TxCB_t Q931Tx34CBProc,
|
||||
Q931TxCB_t Q931Tx32CBProc,
|
||||
Q931ErrorCB_t Q931ErrorCBProc,
|
||||
void *PrivateData)
|
||||
void *PrivateData32,
|
||||
void *PrivateData34)
|
||||
{
|
||||
int y, dchannel, maxchans, has_sync = 0;
|
||||
|
||||
|
@ -105,7 +106,8 @@ L3INT Q931Api_InitTrunk(Q931_TrunkInfo *pTrunk,
|
|||
pTrunk->Q931Tx34CBProc = Q931Tx34CBProc;
|
||||
pTrunk->Q931Tx32CBProc = Q931Tx32CBProc;
|
||||
pTrunk->Q931ErrorCBProc = Q931ErrorCBProc;
|
||||
pTrunk->PrivateData = PrivateData;
|
||||
pTrunk->PrivateData32 = PrivateData32;
|
||||
pTrunk->PrivateData34 = PrivateData34;
|
||||
|
||||
pTrunk->LastCRV = 0;
|
||||
pTrunk->Dialect = Dialect;
|
||||
|
|
|
@ -1968,7 +1968,8 @@ struct Q931_TrunkInfo
|
|||
Q931TxCB_t Q931Tx34CBProc;
|
||||
Q931TxCB_t Q931Tx32CBProc;
|
||||
Q931ErrorCB_t Q931ErrorCBProc;
|
||||
void *PrivateData;
|
||||
void *PrivateData32;
|
||||
void *PrivateData34;
|
||||
|
||||
L3UCHAR Enabled; /* Enabled/Disabled */
|
||||
/* 0 = Disabled */
|
||||
|
@ -2440,6 +2441,7 @@ L3INT Q931Api_InitTrunk(Q931_TrunkInfo *pTrunk,
|
|||
Q931TxCB_t Q931Tx34CBProc,
|
||||
Q931TxCB_t Q931Tx32CBProc,
|
||||
Q931ErrorCB_t Q931ErrorCBProc,
|
||||
void *PrivateData);
|
||||
void *PrivateData32,
|
||||
void *PrivateData34);
|
||||
|
||||
#endif /* _Q931_NL */
|
||||
|
|
Loading…
Reference in New Issue