summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-08-13 17:32:44 +0000
committerMark Spencer <markster@digium.com>2003-08-13 17:32:44 +0000
commitd91f72fd5f050db6c06497089e158b2d1dbf9586 (patch)
tree97db604054b44caec1b496f9dcf1813cd55c2343 /channel.c
parente35371be2bba3d86c18ed253762a56def644358a (diff)
Add any missing locking calls
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index c39363179..81f3a6660 100755
--- a/channel.c
+++ b/channel.c
@@ -704,8 +704,10 @@ int ast_answer(struct ast_channel *chan)
switch(chan->_state) {
case AST_STATE_RINGING:
case AST_STATE_RING:
+ ast_mutex_lock(&chan->lock);
if (chan->pvt->answer)
res = chan->pvt->answer(chan);
+ ast_mutex_unlock(&chan->lock);
ast_setstate(chan, AST_STATE_UP);
if (chan->cdr)
ast_cdr_answer(chan->cdr);