]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix CPU spike when pressing DTMF after agent login.
authorJeff Peeler <jpeeler@digium.com>
Wed, 12 Jan 2011 18:10:42 +0000 (18:10 +0000)
committerJeff Peeler <jpeeler@digium.com>
Wed, 12 Jan 2011 18:10:42 +0000 (18:10 +0000)
The problem here is that DTMF was being continuously deferred and requeued
since ast_safe_sleep is called in a loop. There are serveral other places in the
code that sleeps and then loops in a similar fashion. Because of this fact I
opted to not defer DTMF any more, which will not affect the original fix:

https://reviewboard.asterisk.org/r/674

(closes issue #18130)
Reported by: rgj

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

main/channel.c

index c96de9104f9a5b4857610f7742b965d6b857069a..d92b3c26f41b6d8f16d087f4f05f7ed2c9c3eca5 100644 (file)
@@ -1246,13 +1246,13 @@ int ast_is_deferrable_frame(const struct ast_frame *frame)
         * be queued up or not.
         */
        switch (frame->frametype) {
-       case AST_FRAME_DTMF_END:
        case AST_FRAME_CONTROL:
        case AST_FRAME_TEXT:
        case AST_FRAME_IMAGE:
        case AST_FRAME_HTML:
                return 1;
 
+       case AST_FRAME_DTMF_END:
        case AST_FRAME_DTMF_BEGIN:
        case AST_FRAME_VOICE:
        case AST_FRAME_VIDEO: