diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 20:06:38 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 20:06:38 +0000 |
commit | b3e8737ccfa041d8b31745c912a5d62410641cb1 (patch) | |
tree | 5193c23dfafaea07e369c7b32c392dcd985bb9ea | |
parent | 9801e7a01850e0937b98f193622e72a74d99e7ce (diff) |
Merged revisions 114625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r114625 | mmichelson | 2008-04-24 15:06:06 -0500 (Thu, 24 Apr 2008) | 18 lines
Merged revisions 114624 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r114624 | mmichelson | 2008-04-24 15:04:24 -0500 (Thu, 24 Apr 2008) | 10 lines
Resolve a deadlock in chan_local by releasing the channel lock
temporarily.
(closes issue #11712)
Reported by: callguy
Patches:
11712.patch uploaded by putnopvut (license 60)
Tested by: acunningham
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114626 f38db490-d61c-443f-a65b-d21fe96a405b
-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 19824f45a..1795e0bb0 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -523,7 +523,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) { |