aboutsummaryrefslogtreecommitdiffstats
path: root/rtp.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-24 22:00:23 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-24 22:00:23 +0000
commit015005d2278d2477d26d476751c2960471cdf76a (patch)
treead2987c2c56a7460eda861b358e048e54b4fc174 /rtp.c
parentbafda2c23c8971a16715555d117619a22fcf98de (diff)
show correct seq no in debug output (bug #3849)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5254 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rtp.c b/rtp.c
index 6ca1f916c..a132928d5 100755
--- a/rtp.c
+++ b/rtp.c
@@ -1271,8 +1271,6 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
put_uint32(rtpheader + 4, htonl(rtp->lastts));
put_uint32(rtpheader + 8, htonl(rtp->ssrc));
- rtp->seqno++;
-
if (rtp->them.sin_port && rtp->them.sin_addr.s_addr) {
res = sendto(rtp->s, (void *)rtpheader, f->datalen + hdrlen, 0, (struct sockaddr *)&rtp->them, sizeof(rtp->them));
if (res <0)
@@ -1281,6 +1279,9 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
ast_verbose("Sent RTP packet to %s:%d (type %d, seq %d, ts %d, len %d)\n"
, ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr), ntohs(rtp->them.sin_port), codec, rtp->seqno, rtp->lastts,res - hdrlen);
}
+
+ rtp->seqno++;
+
return 0;
}