add separate private data for tx to 1 and 3.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@97 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2007-05-22 16:27:40 +00:00
parent f59812b19c
commit 50aba550c9
2 changed files with 10 additions and 6 deletions

View File

@ -56,7 +56,8 @@ void Q921_InitTrunk(L2TRUNK trunk,
L2INT hsize,
Q921TxCB_t cb21,
Q921TxCB_t cb23,
void *priv)
void *priv21,
void *priv23)
{
if (trunk->initialized != INITIALIZED_MAGIC) {
MFIFOCreate(trunk->HDLCInQueue, Q921MAXHDLCSPACE, 10);
@ -70,18 +71,19 @@ void Q921_InitTrunk(L2TRUNK trunk,
trunk->NetUser = NetUser;
trunk->Q921Tx21Proc = cb21;
trunk->Q921Tx23Proc = cb23;
trunk->PrivateData = priv;
trunk->PrivateData21 = priv21;
trunk->PrivateData23 = priv23;
trunk->Q921HeaderSpace = hsize;
}
static int Q921Tx21Proc(L2TRUNK trunk, L2UCHAR *Msg, L2INT size)
{
return trunk->Q921Tx21Proc(trunk->PrivateData, Msg, size);
return trunk->Q921Tx21Proc(trunk->PrivateData21, Msg, size);
}
int Q921Tx23Proc(L2TRUNK trunk, L2UCHAR *Msg, L2INT size)
{
return trunk->Q921Tx23Proc(trunk->PrivateData, Msg, size);
return trunk->Q921Tx23Proc(trunk->PrivateData23, Msg, size);
}

View File

@ -106,7 +106,8 @@ struct Q921Data
Q921NetUser_t NetUser;
Q921TxCB_t Q921Tx21Proc;
Q921TxCB_t Q921Tx23Proc;
void *PrivateData;
void *PrivateData21;
void *PrivateData23;
L2INT Q921HeaderSpace;
};
@ -118,7 +119,8 @@ void Q921_InitTrunk(L2TRUNK trunk,
L2INT hsize,
Q921TxCB_t cb21,
Q921TxCB_t cb23,
void *priv);
void *priv21,
void *priv23);
int Q921QueueHDLCFrame(L2TRUNK trunk, L2UCHAR *b, L2INT size);
int Q921Rx12(L2TRUNK trunk);
int Q921Rx32(L2TRUNK trunk, L2UCHAR * Mes, L2INT Size);