Skip to content
Snippets Groups Projects
  • Richard Mudgett's avatar
    1269dd06
    res_fax: Fix latent bug exposed by ASTERISK-24841 changes. · 1269dd06
    Richard Mudgett authored
    Three fax related tests started failing as a result of changes made for
    ASTERISK-24841:
    tests/fax/pjsip/gateway_t38_g711
    tests/fax/sip/gateway_mix1
    tests/fax/sip/gateway_mix3
    
    Historically, ast_channel_make_compatible() did nothing if the channels
    were already "compatible" even if they had a sub-optimal translation path
    already setup.  With the changes from ASTERISK-24841 this is no longer
    true in order to allow the best translation paths to always be picked.  In
    res_fax.c:fax_gateway_framehook() code manually setup the channels to go
    through slin and then called ast_channel_make_compatible().  With the
    previous version of ast_channel_make_compatible() this was always a
    no-operation.
    
    * Remove call to ast_channel_make_compatible() in fax_gateway_framehook()
    that now undoes what was just setup when the framehook is attached.
    
    * Fixed locking around saving the channel formats in
    fax_gateway_framehook() to ensure that the formats that are saved are
    consistent.
    
    * Fix copy pasta errors in fax_gateway_framehook() that confuses read and
    write when dealing with saved channel formats.
    
    ASTERISK-24841
    Reported by: Matt Jordan
    
    Change-Id: I6fda0877104a370af586a5e8cf9e161a484da78d
    1269dd06
    History
    res_fax: Fix latent bug exposed by ASTERISK-24841 changes.
    Richard Mudgett authored
    Three fax related tests started failing as a result of changes made for
    ASTERISK-24841:
    tests/fax/pjsip/gateway_t38_g711
    tests/fax/sip/gateway_mix1
    tests/fax/sip/gateway_mix3
    
    Historically, ast_channel_make_compatible() did nothing if the channels
    were already "compatible" even if they had a sub-optimal translation path
    already setup.  With the changes from ASTERISK-24841 this is no longer
    true in order to allow the best translation paths to always be picked.  In
    res_fax.c:fax_gateway_framehook() code manually setup the channels to go
    through slin and then called ast_channel_make_compatible().  With the
    previous version of ast_channel_make_compatible() this was always a
    no-operation.
    
    * Remove call to ast_channel_make_compatible() in fax_gateway_framehook()
    that now undoes what was just setup when the framehook is attached.
    
    * Fixed locking around saving the channel formats in
    fax_gateway_framehook() to ensure that the formats that are saved are
    consistent.
    
    * Fix copy pasta errors in fax_gateway_framehook() that confuses read and
    write when dealing with saved channel formats.
    
    ASTERISK-24841
    Reported by: Matt Jordan
    
    Change-Id: I6fda0877104a370af586a5e8cf9e161a484da78d