Skip to content
Snippets Groups Projects
  • Moises Silva's avatar
    9792c46a
    Fix WebRTC over WSS not working · 9792c46a
    Moises Silva authored
    Several fixes for the WebSockets implementation in res/res_http_websocket.c
    
    * Flush the websocket session FILE* as fwrite() may not actually guarantee sending
      the data to the network. If we do not flush, it seems that buffering on the SSL
      socket for outbound messages causes issues
    
    * Refactored ast_websocket_read to take into account that SSL file descriptors
      may be ready to read via fread() but poll() will not actually say so because
      the data was already read from the network buffers and is now in the libc buffers
    
    (closes issue ASTERISK-23099)
    (closes issue ASTERISK-21930)
    Review: https://reviewboard.asterisk.org/r/3248/
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
    9792c46a
    History
    Fix WebRTC over WSS not working
    Moises Silva authored
    Several fixes for the WebSockets implementation in res/res_http_websocket.c
    
    * Flush the websocket session FILE* as fwrite() may not actually guarantee sending
      the data to the network. If we do not flush, it seems that buffering on the SSL
      socket for outbound messages causes issues
    
    * Refactored ast_websocket_read to take into account that SSL file descriptors
      may be ready to read via fread() but poll() will not actually say so because
      the data was already read from the network buffers and is now in the libc buffers
    
    (closes issue ASTERISK-23099)
    (closes issue ASTERISK-21930)
    Review: https://reviewboard.asterisk.org/r/3248/
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409681 65c4cc65-6c06-0410-ace0-fbb531ad65f3