]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Use the DTMF frame on the channel when returning a DTMF frame from AST_FRAME_NULL...
authorJoshua Colp <jcolp@digium.com>
Wed, 9 May 2007 19:22:39 +0000 (19:22 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 9 May 2007 19:22:39 +0000 (19:22 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@63698 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index ac258dd34069077ec52e59217821780eed5a445a..b6e62deb8a790dbfac147b9ef669425f9759502d 100644 (file)
@@ -2332,6 +2332,8 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                struct timeval now = ast_tvnow();
                                if (ast_tvdiff_ms(now, chan->dtmf_tv) >= chan->emulate_dtmf_duration) {
                                        chan->emulate_dtmf_duration = 0;
+                                       ast_frfree(f);
+                                       f = &chan->dtmff;
                                        f->frametype = AST_FRAME_DTMF_END;
                                        f->subclass = chan->emulate_dtmf_digit;
                                        f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
@@ -2358,6 +2360,8 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                struct timeval now = ast_tvnow();
                                if (ast_tvdiff_ms(now, chan->dtmf_tv) >= chan->emulate_dtmf_duration) {
                                        chan->emulate_dtmf_duration = 0;
+                                       ast_frfree(f);
+                                       f = &chan->dtmff;
                                        f->frametype = AST_FRAME_DTMF_END;
                                        f->subclass = chan->emulate_dtmf_digit;
                                        f->len = ast_tvdiff_ms(now, chan->dtmf_tv);