aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_local.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 617cd2eb9..f5a6ca142 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -516,11 +516,7 @@ static int local_hangup(struct ast_channel *ast)
if (!p)
return -1;
- while (ast_mutex_trylock(&p->lock)) {
- ast_channel_unlock(ast);
- usleep(1);
- ast_channel_lock(ast);
- }
+ ast_mutex_lock(&p->lock);
if (p->chan && ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE))
ast_set_flag(p->chan, AST_FLAG_ANSWERED_ELSEWHERE);