diff --git a/libs/openzap/src/isdn/Q921.c b/libs/openzap/src/isdn/Q921.c index 944a8a5a31..7b084fe230 100644 --- a/libs/openzap/src/isdn/Q921.c +++ b/libs/openzap/src/isdn/Q921.c @@ -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); } diff --git a/libs/openzap/src/zap_isdn.c b/libs/openzap/src/zap_isdn.c index 2ac84395e5..339dd02a73 100644 --- a/libs/openzap/src/zap_isdn.c +++ b/libs/openzap/src/zap_isdn.c @@ -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);