From: Olle Johansson Date: Mon, 30 Oct 2006 16:09:05 +0000 (+0000) Subject: Bind RTCP to the same IP as RTP X-Git-Tag: 1.4.0-beta4~245 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e93e64a0056283e8bc5073e97f51a5a89810607d;p=thirdparty%2Fasterisk.git Bind RTCP to the same IP as RTP git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46431 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/rtp.c b/main/rtp.c index 4d2b1e247f..83e3ac357f 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))))