Extend 5ESS Setup message parser to handle Display IE in codeset 7

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@550 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Stefan Knoblich 2008-09-09 20:19:03 +00:00
parent 675f163f90
commit b715312d8f
1 changed files with 19 additions and 8 deletions

View File

@ -60,17 +60,17 @@ L3INT ATT5ESSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic
L3INT OOff = 0; L3INT OOff = 0;
L3INT rc = Q931E_NO_ERROR; L3INT rc = Q931E_NO_ERROR;
L3UCHAR last_codeset = 0, codeset = 0; L3UCHAR last_codeset = 0, codeset = 0;
L3UCHAR shift_lock = 1; L3UCHAR shift_nolock = 1;
while (IOff < Size) while (IOff < Size) {
{
if (!shift_lock) { if (shift_nolock) {
codeset = last_codeset; codeset = last_codeset;
} }
if ((IBuf[IOff] & 0xF0) == Q931ie_SHIFT) { if ((IBuf[IOff] & 0xF0) == Q931ie_SHIFT) {
shift_lock = (IBuf[IOff] & 0x08); shift_nolock = (IBuf[IOff] & 0x08);
if (shift_lock) { if (shift_nolock) {
last_codeset = codeset; last_codeset = codeset;
} }
codeset = ((IBuf[IOff] & 0x07)); codeset = ((IBuf[IOff] & 0x07));
@ -125,7 +125,18 @@ L3INT ATT5ESSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic
return Q931E_ILLEGAL_IE; return Q931E_ILLEGAL_IE;
break; break;
} }
} else if (codeset == 7) {
switch (IBuf[IOff])
{
case Q931ie_DISPLAY:
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
if (rc != Q931E_NO_ERROR)
return rc;
break;
default:
return Q931E_ILLEGAL_IE;
break;
}
} else { } else {
return Q931E_ILLEGAL_IE; return Q931E_ILLEGAL_IE;
} }