[Asterisk-cvs] asterisk/channels chan_iax2.c, 1.356, 1.357 chan_vpb.c, 1.95, 1.96 chan_zap.c, 1.530, 1.531

markster markster
Fri Oct 14 13:07:49 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv29359/channels

Modified Files:
	chan_iax2.c chan_vpb.c chan_zap.c 
Log Message:
Make sure when the timeout occurs that we actually break the bridge (bug #5252)


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.356
retrieving revision 1.357
diff -u -d -r1.356 -r1.357
--- chan_iax2.c	14 Oct 2005 05:29:41 -0000	1.356
+++ chan_iax2.c	14 Oct 2005 17:02:20 -0000	1.357
@@ -3184,6 +3184,10 @@
 				timeoutms = 0;
 		}
 		if (!who) {
+			if (!timeoutms) {
+				res = AST_BRIDGE_RETRY;
+				break;
+			}
 			if (ast_check_hangup(c0) || ast_check_hangup(c1)) {
 				res = AST_BRIDGE_FAILED;
 				break;

Index: chan_vpb.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_vpb.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- chan_vpb.c	13 Oct 2005 18:27:53 -0000	1.95
+++ chan_vpb.c	14 Oct 2005 17:02:20 -0000	1.96
@@ -518,6 +518,10 @@
 			/* Are we really ment to be doing nothing ?!?! */
 			who = ast_waitfor_n(cs, 2, &timeoutms);
 			if (!who) {
+				if (!timeoutms) {
+					res = AST_BRIDGE_RETRY;
+					break;
+				}
 				ast_log(LOG_DEBUG, "%s: vpb_bridge: Empty frame read...\n",p0->dev);
 				/* check for hangup / whentohangup */
 				if (ast_check_hangup(c0) || ast_check_hangup(c1))

Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.530
retrieving revision 1.531
diff -u -d -r1.530 -r1.531
--- chan_zap.c	13 Oct 2005 18:27:53 -0000	1.530
+++ chan_zap.c	14 Oct 2005 17:02:20 -0000	1.531
@@ -3139,7 +3139,8 @@
 		ast_mutex_unlock(&c0->lock);
 		ast_mutex_unlock(&c1->lock);
 
-		if ((op0 != p0) ||
+		if (!timeoutms || 
+		    (op0 != p0) ||
 		    (op1 != p1) || 
 		    (ofd0 != c0->fds[0]) || 
 		    (ofd1 != c1->fds[0]) ||




More information about the svn-commits mailing list