What steps will reproduce the problem?
1. Call bind("addr", 0)
2. bind() calls _get_available_port(RFCOMM) to obtain a valid port
3. _get_available_port() tries to bind() with "" instead of "addr" so may
return a port which is not available on "addr"
4. bind("addr", _get_available_port()) will throw out an "address already in
use" error.
What is the expected output? What do you see instead?
_get_available_port() should return an available port on a specified bdaddr, if
one is given to bind().
What version of the product are you using? On what operating system?
Debian 6.0