bluetooth: Fix premature acquire attempts
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Thu, 14 Feb 2013 13:03:21 +0000 (14:03 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 16 Feb 2013 14:53:42 +0000 (16:53 +0200)
commit5d4b7c4a89652d70a924d1c6091398c5b2d84bd3
tree29032bbb5c284010322dacedaad60eef499b5b8c
parent2c666e3e166b2992f114325e3ec53f28f98738df
bluetooth: Fix premature acquire attempts

A transport should be considered connected only after the connection
procedure is complete, as expressed in audio_state_to_transport_state().

module-bluetooth-device should be loaded only after at least one
transport is not only created (during configuration), but also
connected.

This fixes the issue of premature acquire attempts sometimes experienced
when a headset is connected (issue not present in v3.0 though).
src/modules/bluetooth/bluetooth-util.c
src/modules/bluetooth/module-bluetooth-device.c