[asterisk-dev] [Code Review] 3792: media formats: Fix audio within res_fax module.

Matt Jordan reviewboard at asterisk.org
Tue Jul 15 11:24:46 CDT 2014


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



/team/group/media_formats-reviewed-trunk/res/res_fax.c
<https://reviewboard.asterisk.org/r/3792/#comment22923>

    When would we want to feed a non-format frame (meaning, non-VOICE) into the fax stack?
    
    In particular, should we be checking that the frame is VOICE before feeding it to the smoother?


- Matt Jordan


On July 15, 2014, 11:17 a.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3792/
> -----------------------------------------------------------
> 
> (Updated July 15, 2014, 11:17 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The res_fax module does some sanity checks on the frames it receives to make sure they have both the expected frame type and subclass. In the media formats branch the subclass is no longer a union, meaning that all fields are compared. The res_fax module initialized the integer field to -1 but on audio frames this is actually 0, causing the comparison to fail despite the audio frame being expected. This change makes the check more specific, and does an actual format comparison (since the format pointer may be of the same format but a difference structure).
> 
> 
> Diffs
> -----
> 
>   /team/group/media_formats-reviewed-trunk/res/res_fax.c 418628 
> 
> Diff: https://reviewboard.asterisk.org/r/3792/diff/
> 
> 
> Testing
> -------
> 
> PJSIP fax tests now pass happily.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

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


More information about the asterisk-dev mailing list