That's not a valid GUID, so may be worth a double check to make sure that really is copied down correctly?
Huh, not sure why I used this in the first place. Fixed it, thanks.
No need to include guard our own headers; they're always present.
Yeah, this shouldn't have been there to begin with, thanks.
What's wrong with binding to port 0 here? Do we need getaddrname() to return the real port immediately, and Linux won't do that?
Yup, exactly. The procedure on Windows is to get an `bind` to an RFCOMM address, use `getaddrname()` to get the channel/port number, and advertise that channel number to remote devices with SDP.
Stray newline.
Fixed, thanks.