Fixes deadlocks occuring in chan_agent due to r335976
authorJonathan Rose <jrose@digium.com>
Fri, 3 Feb 2012 21:33:23 +0000 (21:33 +0000)
committerJonathan Rose <jrose@digium.com>
Fri, 3 Feb 2012 21:33:23 +0000 (21:33 +0000)
commita898eb4d078750c46cefc2f3fba6b34207eec160
tree1c8a0255e7b3bc54ad9cae3c9af9e187beceffc2
parent71a8457d5379fe04cf8d42db40a24866549a88cb
Fixes deadlocks occuring in chan_agent due to r335976

Bad locking order was added to chan_agent to prevent segfaults from having no locking
in a patch by irroot. This patch addresses the bad locking order by releasing locks before
getting the right locking order to stop deadlocks from occuring when doing multiple
interactions with agents.

(closes issue ASTERISK-19285)
Reported by: Alex Villacis Lasso
Review: https://reviewboard.asterisk.org/r/1708/
........

Merged revisions 353999 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 354000 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_agent.c