aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-23 23:17:30 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-23 23:17:30 +0000
commit7a597f0b735222b4a6bc6067796b8e7354b6c540 (patch)
tree74eb94854a7c827c781bf1643a82312d2646a7d8 /main
parent666c63349a28df9788cd6fdce1211c568def360b (diff)
Merged revisions 178142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r178142 | russell | 2009-02-23 17:11:37 -0600 (Mon, 23 Feb 2009) | 22 lines Merged revisions 178141 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r178141 | russell | 2009-02-23 17:09:01 -0600 (Mon, 23 Feb 2009) | 14 lines Fix infinite DTMF when a BEGIN is received without an END. This commit is related to rev 175124 of 1.4 where a previous attempt was made to fix this problem. The problem with the previous patch was that the inserted code needed to go _before_ setting the lastrxts to the current timestamp. Because those were the same, the dtmfcount variable was never decremented, and so the END was never sent. In passing, I removed the dtmfsamples variable which was completed unused. I also removed a redundant setting of the lastrxts variable. (closes issue #14460) Reported by: moliveras ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@178145 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/rtp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/main/rtp.c b/main/rtp.c
index f20a46f8e..4774179ce 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1590,14 +1590,8 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
rtp->lastrxformat = rtp->f.subclass = rtpPT.code;
rtp->f.frametype = (rtp->f.subclass & AST_FORMAT_AUDIO_MASK) ? AST_FRAME_VOICE : (rtp->f.subclass & AST_FORMAT_VIDEO_MASK) ? AST_FRAME_VIDEO : AST_FRAME_TEXT;
- if (!rtp->lastrxts)
- rtp->lastrxts = timestamp;
-
rtp->rxseqno = seqno;
- /* Record received timestamp as last received now */
- rtp->lastrxts = timestamp;
-
if (rtp->dtmfcount) {
rtp->dtmfcount -= (timestamp - rtp->lastrxts);
@@ -1613,6 +1607,9 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
}
}
+ /* Record received timestamp as last received now */
+ rtp->lastrxts = timestamp;
+
rtp->f.mallocd = 0;
rtp->f.datalen = res - hdrlen;
rtp->f.data = rtp->rawdata + hdrlen + AST_FRIENDLY_OFFSET;