summaryrefslogtreecommitdiff
path: root/main/rtp.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2008-08-10 20:23:50 +0000
committerSean Bright <sean@malleable.com>2008-08-10 20:23:50 +0000
commit790fde68d94de4d7e8260f8ffc0923715783555e (patch)
treeb55253e4a6cb86147db48091cca0af756faf2ed4 /main/rtp.c
parentb69c8e6ab5b5d20a964d67e93cda8dc07da61fa4 (diff)
Another batch of files from RSW. The remaining apps and a few more
files from main/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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);