[Asterisk-cvs] libpri libpri.h,1.58,1.59 pri.c,1.38,1.39

markster markster
Mon Sep 12 22:20:19 CDT 2005


Update of /usr/cvsroot/libpri
In directory mongoose.digium.com:/tmp/cvs-serv23088

Modified Files:
	libpri.h pri.c 
Log Message:
Add ability to restart PRI at Q.921 layer


Index: libpri.h
===================================================================
RCS file: /usr/cvsroot/libpri/libpri.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- libpri.h	2 Sep 2005 18:37:03 -0000	1.58
+++ libpri.h	13 Sep 2005 02:19:00 -0000	1.59
@@ -487,6 +487,9 @@
 #define PRI_DESTROYCALL
 extern void pri_destroycall(struct pri *pri, q931_call *call);
 
+#define PRI_RESTART
+extern int pri_restart(struct pri *pri);
+
 extern int pri_reset(struct pri *pri, int channel);
 
 /* Create a new call */

Index: pri.c
===================================================================
RCS file: /usr/cvsroot/libpri/pri.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- pri.c	21 Jun 2005 22:47:39 -0000	1.38
+++ pri.c	13 Sep 2005 02:19:00 -0000	1.39
@@ -247,6 +247,16 @@
 	return p;
 }
 
+int pri_restart(struct pri *pri)
+{
+	/* Restart Q.921 layer */
+	if (pri) {
+		q921_reset(pri);
+		q921_start(pri, pri->localtype == PRI_CPE);	
+	}
+	return 0;
+}
+
 struct pri *pri_new(int fd, int nodetype, int switchtype)
 {
 	return __pri_new(fd, nodetype, switchtype, NULL, __pri_read, __pri_write, NULL);




More information about the svn-commits mailing list