]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Move log message to before the frame it references is freed.
authorJoshua Colp <jcolp@digium.com>
Mon, 22 Oct 2007 14:27:03 +0000 (14:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 22 Oct 2007 14:27:03 +0000 (14:27 +0000)
(closes issue #11050)
Reported by: slavon
Patches:
      channel.c.86662.diff uploaded by casper (license 55)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86663 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index d21310c795351a9b06b676ae8ee4e12a5f32e728..7c22fcf4bbca8bcdc8c567cfb4317d6af3ffc419 100644 (file)
@@ -2427,9 +2427,9 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                        if ( ast_test_flag(chan, AST_FLAG_DEFER_DTMF | AST_FLAG_END_DTMF_ONLY) || 
                            (!ast_tvzero(chan->dtmf_tv) && 
                              ast_tvdiff_ms(ast_tvnow(), chan->dtmf_tv) < AST_MIN_DTMF_GAP) ) {
+                               ast_log(LOG_DTMF, "DTMF begin ignored '%c' on %s\n", f->subclass, chan->name);
                                ast_frfree(f);
                                f = &ast_null_frame;
-                               ast_log(LOG_DTMF, "DTMF begin ignored '%c' on %s\n", f->subclass, chan->name);
                        } else {
                                ast_set_flag(chan, AST_FLAG_IN_DTMF);
                                chan->dtmf_tv = ast_tvnow();