diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-10-14 17:38:06 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-10-14 17:38:06 +0000 |
commit | 4d9965856b9d52c9dcba39d754a088227b0ba802 (patch) | |
tree | 42b71be6edaf4656ae46163e295be3a26366033f /channels/chan_local.c | |
parent | 6d5409e23d47b9d0ec963f33d1cac6fec02f0ca8 (diff) |
Merged revisions 148912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r148912 | mmichelson | 2008-10-14 12:33:38 -0500 (Tue, 14 Oct 2008) | 9 lines
Deadlock prevention in chan_local.
(closes issue #13676)
Reported by: tacvbo
Patches:
13676.patch uploaded by putnopvut (license 60)
Tested by: tacvbo
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@148913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index a5fa06b42..cc48b303d 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -584,8 +584,12 @@ static int local_hangup(struct ast_channel *ast) } else { p->owner = NULL; ast_module_user_remove(p->u_owner); + while (p->chan && ast_channel_trylock(p->chan)) { + DEADLOCK_AVOIDANCE(&p->lock); + } if (p->chan) { ast_queue_hangup(p->chan); + ast_channel_unlock(p->chan); } } |