summaryrefslogtreecommitdiff
path: root/rtp.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-10-13 18:27:54 +0000
committerMark Spencer <markster@digium.com>2005-10-13 18:27:54 +0000
commitdd11afca4229c2d5746d19d86f0ca960d71fe935 (patch)
treeb5afd966e15542b9db79d321c8bae141fe961d5f /rtp.c
parent6fea13619ef22fc2d2c2bef6d6a9a27867a5a2b4 (diff)
Fix call timeouts with rtp bridge etc (bug #5252)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/rtp.c b/rtp.c
index c3465fda3..78cdfb09a 100755
--- a/rtp.c
+++ b/rtp.c
@@ -1499,7 +1499,7 @@ static struct ast_rtp_protocol *get_proto(struct ast_channel *chan)
/* ast_rtp_bridge: Bridge calls. If possible and allowed, initiate
re-invite so the peers exchange media directly outside
of Asterisk. */
-enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc)
+enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms)
{
struct ast_frame *f;
struct ast_channel *who, *cs[3];
@@ -1513,7 +1513,6 @@ enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel
char iabuf[INET_ADDRSTRLEN];
void *pvt0, *pvt1;
- int to;
int codec0,codec1, oldcodec0, oldcodec1;
memset(&vt0, 0, sizeof(vt0));
@@ -1635,7 +1634,6 @@ enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel
}
return AST_BRIDGE_RETRY;
}
- to = -1;
/* Now check if they have changed address */
ast_rtp_get_peer(p1, &t1);
ast_rtp_get_peer(p0, &t0);
@@ -1677,7 +1675,7 @@ enum ast_bridge_result ast_rtp_bridge(struct ast_channel *c0, struct ast_channel
memcpy(&vac0, &vt0, sizeof(vac0));
oldcodec0 = codec0;
}
- who = ast_waitfor_n(cs, 2, &to);
+ who = ast_waitfor_n(cs, 2, &timeoutms);
if (!who) {
if (option_debug)
ast_log(LOG_DEBUG, "Ooh, empty read...\n");