[asterisk-dev] [Code Review] 4105: codec_dahdi: Fix segfault on load.

Shaun Ruffell reviewboard at asterisk.org
Wed Oct 22 16:27:27 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4105/
-----------------------------------------------------------

(Updated Oct. 22, 2014, 4:27 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 426097


Bugs: ASTERISK-24435
    https://issues.asterisk.org/jira/browse/ASTERISK-24435


Repository: Asterisk


Description
-------

This is another version of https://reviewboard.asterisk.org/r/4100/ that doesn't change anything in the core of Asterisk.  

The commit message from original git-patch:

    codec_dahdi: Cannot use struct ast_translator.core_{src,src}_codec.                                                                                        
                                                                                                                                                               
    This fixes a Segmentation fault introduced in r419044 "media formats: re-architect                                                                         
    handling of media for performance improvements".                                                                                                           
                                                                                                                                                               
    The problem is that codec_dahdi was using using core_src_codec and core_dst_codec in the                                                                   
    ast_translator structure when these fields were never set. Now instead of trying to map                                                                    
    the new core codec descriptions to the way DAHDI defines different codecs, we will store                                                                   
    the DAHDI specific formats in 'struct translator' directly so we can refer to them without                                                                 
    mapping.                                                                                                                                                   
                                                                                                                                                               
    This also allows us to remove the "global_format_map" structure, since we can now query                                                                    
    the list of translators directly to make sure we do not ever register a DAHDI based                                                                        
    translator for a specific path more than once and eliminate the need to keep the list and                                                                  
    the map in sync.                                                         


Diffs
-----

  branches/13/codecs/codec_dahdi.c 426095 

Diff: https://reviewboard.asterisk.org/r/4105/diff/


Testing
-------

Called between two phones with g729 on one side and g722 on the other and made sure transcoder show indicated the transcoder was in use and I could hear myself.


Thanks,

Shaun Ruffell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141022/cf4ce2a6/attachment.html>


More information about the asterisk-dev mailing list