aboutsummaryrefslogtreecommitdiffstats
path: root/rtp.c
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-30 16:00:57 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-30 16:00:57 +0000
commitba63f94f17532b227cf3f6c7f7726c8544239d47 (patch)
tree08190d755384527bb46c2e7bcb6b7833e51bb00f /rtp.c
parentc427703569a43031e67e0dbada44959c62d59f8f (diff)
Bind rtcp to proper IP address
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@46430 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rw-r--r--rtp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rtp.c b/rtp.c
index ee8e2c6c2..e23a813a4 100644
--- a/rtp.c
+++ b/rtp.c
@@ -962,8 +962,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_addr = addr;
rtp->rtcp->us.sin_port = htons(x + 1);
+ }
/* 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))))