Skip to content
Snippets Groups Projects
  • Dade Brandon's avatar
    6dc21bbf
    chan_sip.c: fix websocket_write_timeout default value · 6dc21bbf
    Dade Brandon authored
    websocket_write_timeout was not being set to its default value
    during sip config reload, which meant that prior to this commit,
    1) the default value of 100 was not used, unless an invalid value
    (or 1) was specified in sip.conf for websocket_write_timeout, and
    2) if the websocket_write_timeout directive was removed from sip.conf
    without a full restart of asterisk, then the previous value would
    continue to be used indefinitely.
    
    This essentially lead to a 0ms write timeout (the first write attempt
    in ast_careful_fwrite must have succeeded) in websocket write requests
    from chan_sip, unless websocket_write_timeout was explicitely set in sip.conf.
    
    Changes to websocket_write_timeout still only apply to new websocket
    sessions, after the sip reload -- timeouts on existing sessions are
    not adjusted during sip reload.
    
    Change-Id: Ibed3816ed29cc354af6564c5ab3e75eab72cb953
    6dc21bbf
    History
    chan_sip.c: fix websocket_write_timeout default value
    Dade Brandon authored
    websocket_write_timeout was not being set to its default value
    during sip config reload, which meant that prior to this commit,
    1) the default value of 100 was not used, unless an invalid value
    (or 1) was specified in sip.conf for websocket_write_timeout, and
    2) if the websocket_write_timeout directive was removed from sip.conf
    without a full restart of asterisk, then the previous value would
    continue to be used indefinitely.
    
    This essentially lead to a 0ms write timeout (the first write attempt
    in ast_careful_fwrite must have succeeded) in websocket write requests
    from chan_sip, unless websocket_write_timeout was explicitely set in sip.conf.
    
    Changes to websocket_write_timeout still only apply to new websocket
    sessions, after the sip reload -- timeouts on existing sessions are
    not adjusted during sip reload.
    
    Change-Id: Ibed3816ed29cc354af6564c5ab3e75eab72cb953