bluez5: refcount transport acquire and release, let it manage fd
Backends don't necessarily allow for opening the same device multiple times, and it shouldn't be necessary. Since source and sink are not necessarily both running at the same time, refcount the transport acquire/release so that it knows to close the fd only when no source/sink is running. Let the transport manage the fd lifecycle, also closing it once it is not needed. Don't return the fd from acquire(), since each transport is associated with a single socket fd.
Loading
Please register or sign in to comment