From 8dd051949d230cb322c858ec5f841e02c0ef5355 Mon Sep 17 00:00:00 2001 From: markster Date: Fri, 14 Oct 2005 17:02:20 +0000 Subject: Make sure when the timeout occurs that we actually break the bridge (bug #5252) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6791 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_iax2.c | 4 ++++ channels/chan_vpb.c | 4 ++++ channels/chan_zap.c | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'channels') diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 7292e9f09..4633f80d6 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -3184,6 +3184,10 @@ static enum ast_bridge_result iax2_bridge(struct ast_channel *c0, struct ast_cha 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; diff --git a/channels/chan_vpb.c b/channels/chan_vpb.c index cebe6e2f7..93ab04e67 100755 --- a/channels/chan_vpb.c +++ b/channels/chan_vpb.c @@ -518,6 +518,10 @@ static enum ast_bridge_result vpb_bridge(struct ast_channel *c0, struct ast_chan /* 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)) diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 077eba2f6..eac9c21c0 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -3139,7 +3139,8 @@ static enum ast_bridge_result zt_bridge(struct ast_channel *c0, struct ast_chann 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]) || -- cgit v1.2.3