[Asterisk-cvs] asterisk/channels chan_zap.c,1.316,1.317

markster at lists.digium.com markster at lists.digium.com
Fri Jul 30 16:37:03 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory localhost.localdomain:/tmp/cvs-serv1672/channels

Modified Files:
	chan_zap.c 
Log Message:
Reset conferencing on final hangup (bug #2172)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.316
retrieving revision 1.317
diff -u -d -r1.316 -r1.317
--- chan_zap.c	30 Jul 2004 18:57:37 -0000	1.316
+++ chan_zap.c	30 Jul 2004 20:23:06 -0000	1.317
@@ -1128,6 +1128,17 @@
 	return useslavenative;
 }
 
+static int reset_conf(struct zt_pvt *p)
+{
+	ZT_CONFINFO zi;
+	p->confno = -1;
+	if (p->subs[SUB_REAL].zfd > -1) {
+		if (ioctl(p->subs[SUB_REAL].zfd, ZT_SETCONF, &zi))
+			ast_log(LOG_WARNING, "Failed to reset conferencing on channel %d!\n", p->channel);
+	}
+	return 0;
+}
+
 static int update_conf(struct zt_pvt *p)
 {
 	int needconf = 0;
@@ -2177,6 +2188,7 @@
 		p->dialing = 0;
 		p->rdnis[0] = '\0';
 		update_conf(p);
+		reset_conf(p);
 		/* Restore data mode */
 		if (p->sig == SIG_PRI) {
 			x = 0;
@@ -2188,6 +2200,7 @@
 			/* Free up the bearer channel as well, and
 			   don't use its file descriptor anymore */
 			update_conf(p->bearer);
+			reset_conf(p->bearer);
 			p->bearer->owner = NULL;
 			p->bearer = NULL;
 			p->subs[SUB_REAL].zfd = -1;




More information about the svn-commits mailing list