aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-25 19:05:07 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-25 19:05:07 +0000
commitae37918908b77136280a657b00f25d573091a4c7 (patch)
tree9c29514acc6cd93ac4568b3f377ab3aa5777edaf /include
parentf608bc2c4374f95bde7f48e9a1720363e095b02d (diff)
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.4@292866 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions