Don't hold channel lock while sleeping/waiting for audio stream to get setup. (issue #8834 reported by phsultan)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp 2007-01-17 19:43:13 +00:00
parent ce5d9ab661
commit c71d6c12f7
1 changed files with 2 additions and 0 deletions

View File

@ -1637,8 +1637,10 @@ int __ast_answer(struct ast_channel *chan, unsigned int delay)
res = chan->tech->answer(chan);
ast_setstate(chan, AST_STATE_UP);
ast_cdr_answer(chan->cdr);
ast_channel_unlock(chan);
if (delay)
ast_safe_sleep(chan, delay);
return res;
break;
case AST_STATE_UP:
ast_cdr_answer(chan->cdr);