From 7c6ffbf13149f62b009310b3b425bb3e2a9f02d3 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Tue, 30 Jun 2009 09:42:10 +0000 Subject: [PATCH] Fix encoding of Call State IE, Q.931 (05/98) 4.5.7: bit 8 of octet 3 is part of the coding standard git-svn-id: http://svn.openzap.org/svn/openzap/trunk@751 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/isdn/Q931ie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/openzap/src/isdn/Q931ie.c b/libs/openzap/src/isdn/Q931ie.c index 61ffc3dcc1..7755e2cbaa 100644 --- a/libs/openzap/src/isdn/Q931ie.c +++ b/libs/openzap/src/isdn/Q931ie.c @@ -519,7 +519,7 @@ L3INT Q931Uie_CallState(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHAR pie->IEId = IBuf[Octet++]; /* Octet 2 */ - IESize = IBuf[Octet++]; + IESize = IBuf[Octet++]; /* Octet 3 */ pie->CodStand = (IBuf[Octet + Off] >> 6) & 0x03; @@ -557,7 +557,7 @@ L3INT Q931Pie_CallState(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, OBuf[(*Octet)++] = Q931ie_CALL_STATE; li = (*Octet)++; /* remember length position */ - OBuf[(*Octet)++] = 0x80 | (pIE->CodStand<<6) | pIE->CallState; + OBuf[(*Octet)++] = (pIE->CodStand << 6) | (pIE->CallState & 0x3f); OBuf[li] = (L3UCHAR)((*Octet) - Beg) - 2; return rc;