]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Bind rtcp to proper IP address
authorOlle Johansson <oej@edvina.net>
Mon, 30 Oct 2006 16:00:57 +0000 (16:00 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 30 Oct 2006 16:00:57 +0000 (16:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

rtp.c

diff --git a/rtp.c b/rtp.c
index ee8e2c6c2bcaee67bada3cfa76d153537349557b..e23a813a4238bf22cf6e74aabeccfb14038369b6 100644 (file)
--- 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))))