[asterisk-dev] RTCP port always bound to 0.0.0.0?

Kevin P. Fleming kpfleming at digium.com
Fri Sep 15 09:49:08 MST 2006


----- Tony Mountifield <tony at softins.clara.co.uk> wrote:
>                 /* Must be an even port number by RTP spec */
>                 rtp->us.sin_port = htons(x);
>                 rtp->us.sin_addr = addr;
>                 /* If there's rtcp, initialize it as well. */
>                 if (rtp->rtcp) {
>                         rtp->rtcp->us.sin_port = htons(x + 1);
>                         rtp->rtcp->us.sin_addr = addr;
>                 }

That looks correct; I'd even go so far as to complete the initialization of rtp->us and then memcpy() it onto rtp->rtcp->us and change only the port number.

-- 
Kevin P. Fleming
Senior Software Engineer
Digium, Inc.



More information about the asterisk-dev mailing list