Skip to content
Snippets Groups Projects
Commit 2602b21b authored by Mark Michelson's avatar Mark Michelson
Browse files

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: https://origsvn.digium.com/svn/asterisk/trunk@114625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent ea9014be
No related branches found
No related tags found
No related merge requests found
...@@ -551,7 +551,13 @@ static int local_hangup(struct ast_channel *ast) ...@@ -551,7 +551,13 @@ static int local_hangup(struct ast_channel *ast)
/* Deadlock avoidance */ /* Deadlock avoidance */
while (p->owner && ast_channel_trylock(p->owner)) { while (p->owner && ast_channel_trylock(p->owner)) {
ast_mutex_unlock(&p->lock); ast_mutex_unlock(&p->lock);
if (ast) {
ast_channel_unlock(ast);
}
usleep(1); usleep(1);
if (ast) {
ast_channel_lock(ast);
}
ast_mutex_lock(&p->lock); ast_mutex_lock(&p->lock);
} }
if (p->owner) { if (p->owner) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment