]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make chan id parsing more flezible, seems to follow the spec still correctly.
authorMichael Jerris <mike@jerris.com>
Tue, 26 Jun 2007 14:54:11 +0000 (14:54 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 26 Jun 2007 14:54:11 +0000 (14:54 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@295 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/isdn/Q931ie.c

index 1973d20c41a4732649f34f9c14bdb5cea2449527..84677988f4ad4563e964a780af4c8fe6370e9867 100644 (file)
@@ -1157,7 +1157,7 @@ L3INT Q931Uie_ChanID(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHAR *
     L3INT Off = 0;
     L3INT Octet = 0;
     L3INT IESize;
-
+//18 04 e1 80 83 01
     *pIE=0;
 
     /* Octet 1 */
@@ -1190,8 +1190,8 @@ L3INT Q931Uie_ChanID(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHAR *
         Off = Q931ReadExt(&IBuf[Octet+Off], Off);
         Off++;
     }
-    else
-    {
+
+    if (Octet + Off -2 != IESize) {
         /* Octet 3.2 */
         if(pie->IntType == 1)        /* PRI etc */
         {