path: root/apps
diff options
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-25 19:06:21 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-25 19:06:21 +0000
commitdedac60633f986cbe16edd2b0251f7f5bb9122d9 (patch)
tree9960354bbaf2f2556da9e53979e75a60e073860b /apps
parent3f9564c7be41422b62cedad9e3e99a1d35f8e616 (diff)
Merged revisions 292866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r292866 | dvossel | 2010-10-25 14:05:07 -0500 (Mon, 25 Oct 2010) | 27 lines This patch turns chan_local pvts into astobj2 objects. chan_local does some dangerous things involving deadlock avoidance. tech_pvt functions like hangup and queue_frame are provided with a locked channel upon entry. Those functions are completely safe as long as you don't attempt to give up that channel lock, but that is impossible to guarantee due to the required deadlock avoidance necessary to lock both the tech_pvt and both channels involved. In the past, we have tried to account for this by doing things like setting a "glare" flag that indicates what function should destroy the pvt. This was used in local_hangup and local_queue_frame to decided who should destroy the pvt if they collided in separate threads. I have removed the need to do this by converting all chan_local tech_pvts to astobj2. This means we can ref a pvt before deadlock avoidance and not have to worry about that pvt possibly getting destroyed under us. It also cleans up where we destroy the tech_pvt. The only unlink from the tech_pvt container occurs in local_hangup now, which is where it should occur. Since there still may be thread collisions on some functions like local_hangup after deadlock avoidance, I have added some checks to detect those collisions and exit appropriately. I think this patch is going to solve quite a bit of weirdness we have had with local channels in the past. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@292867 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
0 files changed, 0 insertions, 0 deletions