While trying to fix this cross case issue, i came with an issue with the
way error codes are handled
in avdtp.c.
The issue is basically that the part of the code that retrieves the
exact error value is never executed
due to premature return.
Looks fine to me if it works. However, I'd like to hear some comment
from Marcel as well. At least my connect(2) manpage implies that a
non-blocking connect should always produce a POLLOUT on connection
completion regardless if the result was failure or success. So it seems
bluez may be behaving differently than other socket types in this
respect.