mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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/branches/1.4@148912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -554,8 +554,12 @@ static int local_hangup(struct ast_channel *ast)
|
|||||||
} else {
|
} else {
|
||||||
p->owner = NULL;
|
p->owner = NULL;
|
||||||
ast_module_user_remove(p->u_owner);
|
ast_module_user_remove(p->u_owner);
|
||||||
|
while (p->chan && ast_channel_trylock(p->chan)) {
|
||||||
|
DEADLOCK_AVOIDANCE(&p->lock);
|
||||||
|
}
|
||||||
if (p->chan) {
|
if (p->chan) {
|
||||||
ast_queue_hangup(p->chan);
|
ast_queue_hangup(p->chan);
|
||||||
|
ast_channel_unlock(p->chan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user