Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > b4857d86fc9f93c2a255407bef8831c2 > files > 2

libpri-1.4.10.2-1mdv2010.1.src.rpm

diff -Naurp libpri-1.4.8/pridump.c libpri-1.4.8.oden/pridump.c
--- libpri-1.4.8/pridump.c	2008-08-06 00:18:12.000000000 +0200
+++ libpri-1.4.8.oden/pridump.c	2008-12-11 13:17:04.000000000 +0100
@@ -42,7 +42,7 @@
 #include <sys/ioctl.h>
 #include <sys/select.h>
 #include <sys/types.h>
-#include <zaptel/zaptel.h>
+#include <dahdi/user.h>
 #include "libpri.h"
 #include "pri_q921.h"
 #include "pri_q931.h"
@@ -50,18 +50,18 @@
 static int pri_open(char *dev)
 {
 	int dfd;
-	struct zt_params p;
+	struct dahdi_params p;
 	
 	dfd = open(dev, O_RDWR);
 	if (dfd < 0) {
 		fprintf(stderr, "Failed to open dchannel '%s': %s\n", dev, strerror(errno));
 		return -1;
 	}
-	if (ioctl(dfd, ZT_GET_PARAMS, &p)) {
+	if (ioctl(dfd, DAHDI_GET_PARAMS, &p)) {
 		fprintf(stderr, "Unable to get parameters on '%s': %s\n", dev, strerror(errno));
 		return -1;
 	}
-	if ((p.sigtype != ZT_SIG_HDLCRAW) && (p.sigtype != ZT_SIG_HDLCFCS)) {
+	if ((p.sigtype != DAHDI_SIG_HDLCRAW) && (p.sigtype != DAHDI_SIG_HDLCFCS)) {
 		fprintf(stderr, "%s is in %d signalling, not FCS HDLC or RAW HDLC mode\n", dev, p.sigtype);
 		return -1;
 	}
@@ -94,8 +94,8 @@ static int pri_bridge(int d1, int d2)
 		max = d1;
 		if (max < d2)
 			max = d2;
-		ioctl(d1, ZT_GETEVENT, &e);
-		ioctl(d2, ZT_GETEVENT, &e);
+		ioctl(d1, DAHDI_GETEVENT, &e);
+		ioctl(d2, DAHDI_GETEVENT, &e);
 		res = select(max + 1, &fds, NULL, NULL, NULL);
 		if (res < 0) {
 			fprintf(stderr, "Select returned %d: %s\n", res, strerror(errno));
diff -Naurp libpri-1.4.8/pritest.c libpri-1.4.8.oden/pritest.c
--- libpri-1.4.8/pritest.c	2008-08-06 00:18:12.000000000 +0200
+++ libpri-1.4.8.oden/pritest.c	2008-12-11 13:17:04.000000000 +0100
@@ -45,7 +45,7 @@
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <sys/time.h>
-#include <zaptel/zaptel.h>
+#include <dahdi/user.h>
 #include <zap.h>
 #include "libpri.h"
 
@@ -334,7 +334,7 @@ static int run_pri(int dfd, int swtype, 
 		} else if (res > 0) {
 			e = pri_check_event(pri);
 		} else if (errno == ELAST) {
-			res = ioctl(dfd, ZT_GETEVENT, &x);
+			res = ioctl(dfd, DAHDI_GETEVENT, &x);
 			printf("Got Zaptel event: %d\n", x);
 		} else if (errno != EINTR) 
 			fprintf(stderr, "Error (%d) on select: %s\n", ELAST, strerror(errno));
@@ -343,7 +343,7 @@ static int run_pri(int dfd, int swtype, 
 			handle_pri_event(pri, e);
 		}
 
-		res = ioctl(dfd, ZT_GETEVENT, &x);
+		res = ioctl(dfd, DAHDI_GETEVENT, &x);
 
 		if (!res && x) {
 			fprintf(stderr, "Got event on PRI interface: %d\n", x);
@@ -365,7 +365,7 @@ int main(int argc, char *argv[]) 
 	int dfd;
 	int swtype = PRI_DEF_SWITCHTYPE;
 	int node = PRI_DEF_NODETYPE;
-	struct zt_params p;
+	struct dahdi_params p;
 	if (argc < 2) {
 		fprintf(stderr, "Usage: pritest <dchannel> [swtypetype] [nodetype]\n");
 		exit(1);
@@ -375,11 +375,11 @@ int main(int argc, char *argv[]) 
 		fprintf(stderr, "Failed to open dchannel '%s': %s\n", argv[1], strerror(errno));
 		exit(1);
 	}
-	if (ioctl(dfd, ZT_GET_PARAMS, &p)) {
+	if (ioctl(dfd, DAHDI_GET_PARAMS, &p)) {
 		fprintf(stderr, "Unable to get parameters on '%s': %s\n", argv[1], strerror(errno));
 		exit(1);
 	}
-	if ((p.sigtype != ZT_SIG_HDLCRAW) && (p.sigtype != ZT_SIG_HDLCFCS)) {
+	if ((p.sigtype != DAHDI_SIG_HDLCRAW) && (p.sigtype != DAHDI_SIG_HDLCFCS)) {
 		fprintf(stderr, "%s is in %d signalling, not FCS HDLC or RAW HDLC mode\n", argv[1], p.sigtype);
 		exit(1);
 	}
diff -Naurp libpri-1.4.8/testprilib.c libpri-1.4.8.oden/testprilib.c
--- libpri-1.4.8/testprilib.c	2008-08-06 00:18:12.000000000 +0200
+++ libpri-1.4.8.oden/testprilib.c	2008-12-11 13:17:04.000000000 +0100
@@ -48,7 +48,7 @@
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
-#include <zaptel/zaptel.h>
+#include <dahdi/user.h>
 #ifndef SOLARIS
 #include <zap.h>
 #endif