diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-20 14:05:53 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-20 14:05:53 +0000 |
commit | e45257d2dbd14b2e01a130d0fbff3690e688d0d2 (patch) | |
tree | fe5a89c18e75e59b3a2c29e9ae6d2ecaa1d0c0b5 /main/channel.c | |
parent | 0ad5ee08e07dc6a5fa885611b72cb2ccbf26d5c6 (diff) |
Merged revisions 189278 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r189278 | mmichelson | 2009-04-20 09:05:27 -0500 (Mon, 20 Apr 2009) | 18 lines
Merged revisions 189277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r189277 | mmichelson | 2009-04-20 09:04:41 -0500 (Mon, 20 Apr 2009) | 12 lines
Move the check for chan->fdno == -1 to after the zombie/hangup check.
Many users were finding that their hung up channels were staying up and
causing 100% CPU usage.
(issue #14723)
Reported by: seadweller
Patches:
14723_1-4-tip.patch uploaded by mmichelson (license 60)
Tested by: falves11, bamby
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@189279 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/channel.c b/main/channel.c index 66438f9f1..b0e5d374d 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2524,6 +2524,13 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) goto done; } + /* Stop if we're a zombie or need a soft hangup */ + if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) { + if (chan->generator) + ast_deactivate_generator(chan); + goto done; + } + if (chan->fdno == -1) { #ifdef AST_DEVMODE ast_log(LOG_ERROR, "ast_read() called with no recorded file descriptor.\n"); @@ -2533,13 +2540,6 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) f = &ast_null_frame; goto done; } - - /* Stop if we're a zombie or need a soft hangup */ - if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) { - if (chan->generator) - ast_deactivate_generator(chan); - goto done; - } prestate = chan->_state; /* Read and ignore anything on the alertpipe, but read only |