[libss7-commits] mattf: branch mattf/bug13495 r230 - /team/mattf/bug13495/

SVN commits to the libss7 project libss7-commits at lists.digium.com
Fri Dec 5 16:30:43 CST 2008


Author: mattf
Date: Fri Dec  5 16:30:43 2008
New Revision: 230

URL: http://svn.digium.com/view/libss7?view=rev&rev=230
Log:
Add support for SLC specification of an mtp2 link

Modified:
    team/mattf/bug13495/libss7.h
    team/mattf/bug13495/parser_debug.c
    team/mattf/bug13495/ss7.c
    team/mattf/bug13495/ss7linktest.c
    team/mattf/bug13495/ss7test.c

Modified: team/mattf/bug13495/libss7.h
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/libss7.h?view=diff&rev=230&r1=229&r2=230
==============================================================================
--- team/mattf/bug13495/libss7.h (original)
+++ team/mattf/bug13495/libss7.h Fri Dec  5 16:30:43 2008
@@ -422,7 +422,7 @@
 
 struct timeval *ss7_schedule_next(struct ss7 *ss7);
 
-int ss7_add_link(struct ss7 *ss7, int transport, int fd);
+int ss7_add_link(struct ss7 *ss7, int transport, int fd, int slc);
 
 int ss7_set_adjpc(struct ss7 *ss7, int fd, unsigned int pc);
 

Modified: team/mattf/bug13495/parser_debug.c
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/parser_debug.c?view=diff&rev=230&r1=229&r2=230
==============================================================================
--- team/mattf/bug13495/parser_debug.c (original)
+++ team/mattf/bug13495/parser_debug.c Fri Dec  5 16:30:43 2008
@@ -74,7 +74,7 @@
 
 	printf("\n");
 
-	ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, 10);
+	ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, 10, -1);
 
 	ss7->debug = SS7_DEBUG_MTP2 | SS7_DEBUG_MTP3 | SS7_DEBUG_ISUP;
 	ss7->links[0]->state = MTP_INSERVICE;

Modified: team/mattf/bug13495/ss7.c
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/ss7.c?view=diff&rev=230&r1=229&r2=230
==============================================================================
--- team/mattf/bug13495/ss7.c (original)
+++ team/mattf/bug13495/ss7.c Fri Dec  5 16:30:43 2008
@@ -199,7 +199,7 @@
 	mtp3_noalarm(ss7, fd);
 }
 
-int ss7_add_link(struct ss7 *ss7, int transport, int fd)
+int ss7_add_link(struct ss7 *ss7, int transport, int fd, int slc)
 {
 	struct mtp2 *m;
 
@@ -220,7 +220,10 @@
 		if (!m)
 			return -1;
 
-		m->slc = ss7->numlinks;
+		if (slc > -1)
+			m->slc = slc;
+		else
+			m->slc = ss7->numlinks;
 		ss7->numlinks += 1;
 		m->master = ss7;
 		if (zapmtp2)

Modified: team/mattf/bug13495/ss7linktest.c
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/ss7linktest.c?view=diff&rev=230&r1=229&r2=230
==============================================================================
--- team/mattf/bug13495/ss7linktest.c (original)
+++ team/mattf/bug13495/ss7linktest.c Fri Dec  5 16:30:43 2008
@@ -319,7 +319,7 @@
 	ss7_set_network_ind(ss7, SS7_NI_NAT);
 
 	ss7_set_debug(ss7, 0xfffffff);
-	if ((ss7_add_link(ss7, ismtp2 ? SS7_TRANSPORT_DAHDIMTP2 : SS7_TRANSPORT_DAHDIDCHAN, fd))) {
+	if ((ss7_add_link(ss7, ismtp2 ? SS7_TRANSPORT_DAHDIMTP2 : SS7_TRANSPORT_DAHDIDCHAN, fd, -1))) {
 		perror("ss7_add_link");
 		exit(1);
 	}

Modified: team/mattf/bug13495/ss7test.c
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/ss7test.c?view=diff&rev=230&r1=229&r2=230
==============================================================================
--- team/mattf/bug13495/ss7test.c (original)
+++ team/mattf/bug13495/ss7test.c Fri Dec  5 16:30:43 2008
@@ -218,7 +218,7 @@
 	ss7_set_error(myprintf);
 
 	ss7_set_debug(ss7, 0xffffffff);
-	if ((ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, fds[0]))) {
+	if ((ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, fds[0], -1))) {
 		perror("ss7_add_link");
 		exit(1);
 	}
@@ -235,7 +235,7 @@
 	ss7_set_debug(ss7, 0xffffffff);
 	linkset[1].linkno = 1;
 
-	if ((ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, fds[1]))) {
+	if ((ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, fds[1], -1))) {
 		perror("ss7_add_link");
 		exit(1);
 	}




More information about the libss7-commits mailing list