diff options
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_local.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 57cab05e8..b0e51f90d 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -515,7 +515,13 @@ static int local_hangup(struct ast_channel *ast) /* Deadlock avoidance */ while (p->owner && ast_channel_trylock(p->owner)) { ast_mutex_unlock(&p->lock); + if (ast) { + ast_channel_unlock(ast); + } usleep(1); + if (ast) { + ast_channel_lock(ast); + } ast_mutex_lock(&p->lock); } if (p->owner) { |