diff options
author | Russell Bryant <russell@russellbryant.com> | 2010-03-06 14:16:20 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2010-03-06 14:16:20 +0000 |
commit | 0c45fc4edacf324926c85774ab0e2ca466f1e7e6 (patch) | |
tree | 2debb1f980d3c2bb4a51d51b27ce98aa55ef243e /main | |
parent | 86a215c83e7202b055f01d4116dbc86f2463abdf (diff) |
Fix a crash in SIP blind transfer handling found by an automated external test.
The first real test added to the external test suite found a pretty nasty crash
that occurred in Asterisk trunk. The crash was due to a race condition between
the REFER handling and channel destruction in the channel thread. After the
transfer has been completed, we go back to the transferrer channel and try to
lock it so we can fire off a CEL event. However, there was no guarantee that
the channel was still around at that point since it's racing against the channel
thread.
Since ast_channel is a reference counted object, the fix is simple. The code
unlocks the transferrer channel before finally completing the transfer with
an async goto. At this point the channel thread is going to start call tear
down and the channel will eventually be destroyed. To ensure that the channel
is valid when we want to fire off the CEL event, increase the channel's
reference count.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
0 files changed, 0 insertions, 0 deletions