Skip to content
Snippets Groups Projects
  • Matthew Jordan's avatar
    b80431fe
    Fix issue where chan_mobile fails to bind to first available port · b80431fe
    Matthew Jordan authored
    Per the bluez API, in order to bind to the first available port, the rc_channel
    field of the socket addressing structure used to bind the socket should be set
    to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it
    to connect to whatever happens to be on port 1.
    
    We could probably not explicitly set rc_channel to 0 since we memset the struct
    earlier, but explicitly setting it will hopefully prevent someone from coming
    in and setting it to some explicit port in the future.
    
    (closes issue ASTERISK-16357)
    Reported by: challado
    Tested by: Alexander Heinz, Nikolay Ilduganov, benjamin, eliafino, David van Geyn
    patches:
      ASTERISK-16357.diff uploaded by Nikolay Ilduganov (license 6253)
    ........
    
    Merged revisions 379342 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
    b80431fe
    History
    Fix issue where chan_mobile fails to bind to first available port
    Matthew Jordan authored
    Per the bluez API, in order to bind to the first available port, the rc_channel
    field of the socket addressing structure used to bind the socket should be set
    to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it
    to connect to whatever happens to be on port 1.
    
    We could probably not explicitly set rc_channel to 0 since we memset the struct
    earlier, but explicitly setting it will hopefully prevent someone from coming
    in and setting it to some explicit port in the future.
    
    (closes issue ASTERISK-16357)
    Reported by: challado
    Tested by: Alexander Heinz, Nikolay Ilduganov, benjamin, eliafino, David van Geyn
    patches:
      ASTERISK-16357.diff uploaded by Nikolay Ilduganov (license 6253)
    ........
    
    Merged revisions 379342 from http://svn.asterisk.org/svn/asterisk/branches/1.8
    
    
    git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@379343 65c4cc65-6c06-0410-ace0-fbb531ad65f3