[svn-commits] mattf: trunk r185 - in /trunk: libss7.h ss7.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 11 15:26:14 CDT 2008


Author: mattf
Date: Fri Jul 11 15:26:14 2008
New Revision: 185

URL: http://svn.digium.com/view/libss7?view=rev&rev=185
Log:
Remove DAHDI dependency from libss7

Modified:
    trunk/libss7.h
    trunk/ss7.c

Modified: trunk/libss7.h
URL: http://svn.digium.com/view/libss7/trunk/libss7.h?view=diff&rev=185&r1=184&r2=185
==============================================================================
--- trunk/libss7.h (original)
+++ trunk/libss7.h Fri Jul 11 15:26:14 2008
@@ -97,9 +97,9 @@
 #define CPG_EVENT_CFU		0x06
 
 /* SS7 transport types */
-#define SS7_TRANSPORT_ZAP	0
-#define SS7_TRANSPORT_DAHDI	0
-#define SS7_TRANSPORT_TCP	1
+#define SS7_TRANSPORT_DAHDIDCHAN	0
+#define SS7_TRANSPORT_DAHDIMTP2		1
+#define SS7_TRANSPORT_TCP		2
 
 struct ss7;
 struct isup_call;

Modified: trunk/ss7.c
URL: http://svn.digium.com/view/libss7/trunk/ss7.c?view=diff&rev=185&r1=184&r2=185
==============================================================================
--- trunk/ss7.c (original)
+++ trunk/ss7.c Fri Jul 11 15:26:14 2008
@@ -17,7 +17,6 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <stdarg.h>
-#include <dahdi/user.h>
 #include <sys/ioctl.h>
 #include <sys/poll.h>
 #include "libss7.h"
@@ -176,22 +175,12 @@
 	if (transport == SS7_TRANSPORT_TCP) {
 	}
 
-	if (transport == SS7_TRANSPORT_DAHDI) {
+	if ((transport == SS7_TRANSPORT_DAHDIDCHAN) || (transport == SS7_TRANSPORT_DAHDIMTP2)) {
 		int zapmtp2 = 0;
-#ifdef DAHDI_SIG_MTP2
-		struct dahdi_params z;
-		int res;
-
-		res = ioctl(fd, DAHDI_GET_PARAMS, &z);
-		if (res)
-			return res;
-
-		if (z.sigtype == DAHDI_SIG_MTP2) {
-			printf("Found zapmtp2\n");
+
+		if (transport == SS7_TRANSPORT_DAHDIMTP2)
 			zapmtp2 = 1;
-		}
-
-#endif /* DAHDI_SIG_MTP2 */
+
 		m = mtp2_new(fd, ss7->switchtype);
 		
 		if (!m)




More information about the svn-commits mailing list