git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46456
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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))))