[svn-commits] mattf: trunk r134 - /trunk/isup.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Nov 17 16:51:53 CST 2007


Author: mattf
Date: Sat Nov 17 16:51:53 2007
New Revision: 134

URL: http://svn.digium.com/view/libss7?view=rev&rev=134
Log:
Make sure CICs over 256 work.  Oops.

Modified:
    trunk/isup.c

Modified: trunk/isup.c
URL: http://svn.digium.com/view/libss7/trunk/isup.c?view=diff&rev=134&r1=133&r2=134
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Sat Nov 17 16:51:53 2007
@@ -2037,9 +2037,9 @@
 	mh = (struct isup_h*) buf;
 
 	if (ss7->switchtype == SS7_ITU) {
-		cic = mh->cic[0] | ((mh->cic[1] << 8) & 0x0f);
+		cic = mh->cic[0] | ((mh->cic[1] & 0x0f) << 8);
 	} else {
-		cic = mh->cic[0] | ((mh->cic[1] << 8) & 0x3f);
+		cic = mh->cic[0] | ((mh->cic[1] & 0x3f) << 8);
 	}
 	/* Find us in the message list */
 	for (x = 0; x < sizeof(messages)/sizeof(struct message_data); x++)
@@ -2154,9 +2154,9 @@
 
 	mh = (struct isup_h*) buf;
 	if (ss7->switchtype == SS7_ITU) {
-		cic = mh->cic[0] | ((mh->cic[1] << 8) & 0x0f);
+		cic = mh->cic[0] | ((mh->cic[1] & 0x0f) << 8);
 	} else {
-		cic = mh->cic[0] | ((mh->cic[1] << 8) & 0x3f);
+		cic = mh->cic[0] | ((mh->cic[1] & 0x3f) << 8);
 	}
 
 	/* Find us in the message list */




More information about the svn-commits mailing list