From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This makes sure the devices are discovered before the backend start creating new transports. --- src/modules/bluetooth/bluez5-util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c index 93677b4..818790d 100644 --- a/src/modules/bluetooth/bluez5-util.c +++ b/src/modules/bluetooth/bluez5-util.c @@ -889,6 +889,9 @@ static void get_managed_objects_reply(DBusPendingCall *pending, void *userdata) y->objects_listed = true; + if (!y->backend) + y->backend = pa_bluetooth_backend_new(y->core); + finish: dbus_message_unref(r); @@ -1591,7 +1594,6 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) { endpoint_init(y, PA_BLUETOOTH_PROFILE_A2DP_SINK); endpoint_init(y, PA_BLUETOOTH_PROFILE_A2DP_SOURCE); - y->backend = pa_bluetooth_backend_new(c); get_managed_objects(y); -- 1.9.3