aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-30 16:09:05 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-30 16:09:05 +0000
commite0e1cd85985ee346aad8d30e7f77c7bdac9d625a (patch)
tree081978ade60bd8f5e215d0030eb27f8930222cb4 /main
parent918059084457e230e4024d65425e1539b9cfd448 (diff)
Bind RTCP to the same IP as RTP
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46431 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/rtp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 4d2b1e247..83e3ac357 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1758,8 +1758,10 @@ struct ast_rtp *ast_rtp_new_with_bindaddr(struct sched_context *sched, struct io
rtp->us.sin_port = htons(x);
rtp->us.sin_addr = addr;
/* If there's rtcp, initialize it as well. */
- if (rtp->rtcp)
+ if (rtp->rtcp) {
rtp->rtcp->us.sin_port = htons(x + 1);
+ rtp->rtcp->us.sin_addr = addr;
+ }
/* Try to bind it/them. */
if (!(first = bind(rtp->s, (struct sockaddr *)&rtp->us, sizeof(rtp->us))) &&
(!rtp->rtcp || !bind(rtp->rtcp->s, (struct sockaddr *)&rtp->rtcp->us, sizeof(rtp->rtcp->us))))