diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-24 23:00:59 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-24 23:00:59 +0000 |
commit | a06336bfa3da9bf6753aa9e4df428b8f837ce56c (patch) | |
tree | b6762c7aeb1e8f107ddfa6500e91ca2427c969d6 /channel.c | |
parent | aed30d1546eb5e56b5bf00dd87bd3ebc797454da (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@8607 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2005,10 +2005,12 @@ int ast_indicate(struct ast_channel *chan, int condition) { int res = -1; + ast_mutex_lock(&chan->lock); /* Stop if we're a zombie or need a soft hangup */ - if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) + if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) { + ast_mutex_unlock(&chan->lock); return -1; - ast_mutex_lock(&chan->lock); + } if (chan->tech->indicate) res = chan->tech->indicate(chan, condition); ast_mutex_unlock(&chan->lock); |