[svn-commits] mattf: trunk r39 - /trunk/mtp3.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Sep 7 19:07:18 MST 2006


Author: mattf
Date: Thu Sep  7 21:07:17 2006
New Revision: 39

URL: http://svn.digium.com/view/libss7?rev=39&view=rev
Log:
Fixes to make MTP3 come up in ANSI.  We got an ANSI link to come up!!!! *jumps up and down*

Modified:
    trunk/mtp3.c

Modified: trunk/mtp3.c
URL: http://svn.digium.com/view/libss7/trunk/mtp3.c?rev=39&r1=38&r2=39&view=diff
==============================================================================
--- trunk/mtp3.c (original)
+++ trunk/mtp3.c Thu Sep  7 21:07:17 2006
@@ -174,7 +174,7 @@
 
 	ss7_msg_userpart_len(m, rllen + testlen + 2);
 
-	mtp3_transmit(link->master, SIG_STD_TEST, link->slc, m);
+	mtp3_transmit(link->master, (ss7->switchtype == SS7_ITU) ? SIG_STD_TEST : SIG_SPEC_TEST, link->slc, m);
 }
 
 static int net_mng_receive(struct ss7 *ss7, struct mtp2 *mtp2, unsigned char *buf, int len)
@@ -339,10 +339,10 @@
 	switch (userpart) {
 		case SIG_NET_MNG:
 		case SIG_STD_TEST:
+		case SIG_SPEC_TEST:
 			return net_mng_dump(ss7, link, sif, siflen);
 		case SIG_ISUP:
 			return isup_dump(ss7, link, sif + rlsize, siflen - rlsize);
-		case SIG_SPEC_TEST:
 		case SIG_SCCP:
 		default:
 			return 0;
@@ -364,7 +364,7 @@
 
 	/* Check NI to make sure it's set correct */
 	if (ss7->ni != ni) {
-		mtp_error(ss7, "Received MSU with network indicator of %d, but we are %d\n", ss7->ni, ni);
+		mtp_error(ss7, "Received MSU with network indicator of %d, but we are %d\n", ni, ss7->ni);
 		return -1;
 	}
 
@@ -381,13 +381,13 @@
 	/* Pass it to the correct user part */
 	switch (userpart) {
 		case SIG_STD_TEST:
+		case SIG_SPEC_TEST:
 			return std_test_receive(ss7, link, sif, siflen);
 		case SIG_ISUP:
 			/* Skip the routing label */
 			return isup_receive(ss7, link, sif + rlsize, siflen - rlsize);
 		case SIG_NET_MNG:
 			return net_mng_receive(ss7, link, sif, siflen);
-		case SIG_SPEC_TEST:
 		case SIG_SCCP:
 		default:
 			mtp_message(ss7, "Unable to process message destined for userpart %d; dropping message\n", userpart);



More information about the svn-commits mailing list