Skip to content
Snippets Groups Projects
  • Ivan Poddubny's avatar
    41bf5231
    addons/res_config_mysql: Don't mutate va_list parameters · 41bf5231
    Ivan Poddubny authored
    The realtime API passes down the va_list argument to each RT engine in
    failover chain until one succeeds. MySQL engine used to access the
    variable argument list with va_arg, which mutates the va_list, so the
    next engine in failover chain gets invalid agrument list.
    This patch uses va_copy to preserve the original va_list argument intact.
    
    ASTERISK-19538 #close
    Reported by: alexat
    Tested by: Ivan Poddubny
    
    Change-Id: I7738b9f98bde81ddfbc2c0fa579d85a0c3e580ae
    41bf5231
    History
    addons/res_config_mysql: Don't mutate va_list parameters
    Ivan Poddubny authored
    The realtime API passes down the va_list argument to each RT engine in
    failover chain until one succeeds. MySQL engine used to access the
    variable argument list with va_arg, which mutates the va_list, so the
    next engine in failover chain gets invalid agrument list.
    This patch uses va_copy to preserve the original va_list argument intact.
    
    ASTERISK-19538 #close
    Reported by: alexat
    Tested by: Ivan Poddubny
    
    Change-Id: I7738b9f98bde81ddfbc2c0fa579d85a0c3e580ae