aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-10 20:23:50 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-10 20:23:50 +0000
commit9ae91f799ab15938b69b072b681fb606286d08ea (patch)
treeb55253e4a6cb86147db48091cca0af756faf2ed4 /main/rtp.c
parent8cb986b936ea0cee5af2dccf467fe1fc5b89414b (diff)
Another batch of files from RSW. The remaining apps and a few more
files from main/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137089 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 03f19ef1a..bca955dea 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1610,8 +1610,10 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
(rtp->them.sin_port != sock_in.sin_port)) {
rtp->them = sock_in;
if (rtp->rtcp) {
+ int h = 0;
memcpy(&rtp->rtcp->them, &sock_in, sizeof(rtp->rtcp->them));
- rtp->rtcp->them.sin_port = htons(ntohs(rtp->them.sin_port)+1);
+ h = ntohs(rtp->them.sin_port);
+ rtp->rtcp->them.sin_port = htons(h + 1);
}
rtp->rxseqno = 0;
ast_set_flag(rtp, FLAG_NAT_ACTIVE);