revert back to previous api for 921 callbacks expected return

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@127 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale 2007-05-24 01:55:26 +00:00
parent 96de29a23b
commit 7ebb574f03
2 changed files with 7 additions and 2 deletions

View File

@ -504,7 +504,7 @@ int Q921Rx12(L2TRUNK trunk)
/* we increment before we "really" know its good so that if we send in the callback, we use the right nr */
trunk->vr++;
if(Q921Tx23Proc(trunk, smes, size-2) >= 0) /* -2 to clip away CRC */
if(Q921Tx23Proc(trunk, smes, size-2)) /* -2 to clip away CRC */
{
Q921SendRR(trunk, (mes[0]&0xfc)>>2, (mes[0]>>1)&0x01, mes[1]>>1, mes[3]&0x01);
}

View File

@ -88,6 +88,11 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen)
return 0;
}
static int zap_isdn_921_23(void *pvt, L2UCHAR *msg, L2INT mlen)
{
return ((Q931Rx23(pvt, msg, mlen) >= 0) ? 1 : 0);
}
static int zap_isdn_921_21(void *pvt, L2UCHAR *msg, L2INT mlen)
{
zap_span_t *span = (zap_span_t *) pvt;
@ -235,7 +240,7 @@ zap_status_t zap_isdn_configure_span(zap_span_t *span, Q921NetUser_t mode, Q931D
mode,
0,
zap_isdn_921_21,
(Q921TxCB_t)Q931Rx23,
(Q921TxCB_t)zap_isdn_921_23,
span,
&span->isdn_data->q931);