[asterisk-dev] [Code Review] 3431: Fix channel staging assertion failure.
rmudgett
reviewboard at asterisk.org
Wed Apr 9 14:19:00 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3431/
-----------------------------------------------------------
Review request for Asterisk Developers.
Repository: Asterisk
Description
-------
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 the 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 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.
* Moved sip_pvt unref in ast_hangup() and handle_request_do() to the end of the function. The unref needs to happen after the last use of the pointer.
Diffs
-----
/branches/12/main/rtp_engine.c 412047
/branches/12/channels/chan_sip.c 412047
Diff: https://reviewboard.asterisk.org/r/3431/diff/
Testing
-------
I was unsuccessful in reproducing the testsuite channel staging assertion failure.
However, SIP calls can still setup and teardown with the patch installed.
Thanks,
rmudgett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140409/872fc518/attachment.html>
More information about the asterisk-dev
mailing list