[asterisk-dev] [Code Review] 3753: media_formats: Prevent crash during masquerade
Matt Jordan
reviewboard at asterisk.org
Sun Jul 13 21:04:01 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3753/
-----------------------------------------------------------
(Updated July 13, 2014, 9:04 p.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Changes
-------
Committed in revision 418567
Repository: Asterisk
Description
-------
When a masquerade occurs, a newly created channel replaces an existing channel and steals its private data structure. This includes swapping the formats and capabilities.
Since the newly created channel only contains ast_format_none, this causes an assert to fire when the masqueraded channel is destroyed.
Removing the assert isn't a good idea. However, there's also no real need to do the accessing that fires the asserts either: the masqueraded channel will be destroyed, the references will be cleaned up appropriately, and life will go on. free_translation is also called in a channel destructor, and again, things will be cleaned up appropriately without going through the accessors that have the asserts.
Diffs
-----
/team/group/media_formats-reviewed-trunk/main/channel.c 418435
Diff: https://reviewboard.asterisk.org/r/3753/diff/
Testing
-------
The crashing test (tests/apps/dial/dial_dtmf_hangup_cancel) now passes
Thanks,
Matt Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140714/50a420e7/attachment.html>
More information about the asterisk-dev
mailing list