]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip.c: Fix channel staging assertion failure.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 15 Apr 2014 17:01:33 +0000 (17:01 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 15 Apr 2014 17:01:33 +0000 (17:01 +0000)
commitecd1f0eef58b68fb31a79b3e74e03054c03a3e40
tree6a9ff15de673c152618f622fa4dfc4e6c78c4623
parent026d9e46138871a0cd48f6af35b4c6239bfe8b6f
chan_sip.c: Fix channel staging assertion failure.

The failing assertion ensures that the final snapshot gets generated so
CDR records can get finalized.  The only place where a channel staging
snapshot flag could be left set is in chan_sip.c:handle_request_bye().
The function could return before clearing the flag because the channel
could dissappear while the function had to have the channel unlocked.

* Fixed handle_request_bye() channel snapshot staging coverage area to not
have a return in the middle of it and be unable to clear the staging flag.

* Pushed the channel snapshot staging coverage area into
ast_rtp_instance_set_stats_vars() to ensure that the staging is not
interrutped.

* Made callers of ast_rtp_instance_set_stats_vars() not call it with any
channels or channel driver private locks held to eliminate the deadlock
potential.  The callers must hold references to the passed in channel and
rtp objects.

* Eliminated sip_hangup() trying to get the bridge peer.  It is futile at
this point because the channel could never be in a bridge.

Review: https://reviewboard.asterisk.org/r/3431/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c
include/asterisk/rtp_engine.h
main/rtp_engine.c