diff --git a/libs/openzap/src/isdn/Q931.c b/libs/openzap/src/isdn/Q931.c index 272d768766..0415f39512 100644 --- a/libs/openzap/src/isdn/Q931.c +++ b/libs/openzap/src/isdn/Q931.c @@ -340,10 +340,13 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT Size) L3INT IOff = 0; - /* Protocol Discriminator */ + /* Reset our decode buffer */ + memset(pTrunk->L3Buf, 0, sizeof(pTrunk->L3Buf)); + + /* Protocol Discriminator */ m->ProtDisc = Mes[IOff++]; - /* CRV */ + /* CRV */add m->CRVFlag = Mes[IOff + 1] & 0x80; m->CRV = Q931Uie_CRV(pTrunk, Mes, m->buf, &IOff, &ISize);