diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-14 17:39:39 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-14 17:39:39 +0000 |
commit | 210975766b0eb5a48d89b764623738675a282e79 (patch) | |
tree | 642aa680e1c25260b7a4814d25730f55cdbd0a73 /channels | |
parent | 599d5a8d8f166d974b05fcdabb107c67bf564018 (diff) |
Merged revisions 148913 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r148913 | mmichelson | 2008-10-14 12:38:06 -0500 (Tue, 14 Oct 2008) | 17 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.1@148915 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-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); } } |