bluetooth: use device flag to prevent assertion failure during shutdown

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/491>
This commit is contained in:
Igor V. Kovalenko 2021-02-01 20:51:18 +03:00 committed by Igor Kovalenko
parent 698fb3bc26
commit c884ae8c74
4 changed files with 5 additions and 9 deletions

View file

@ -641,7 +641,7 @@ static DBusMessage *profile_new_connection(DBusConnection *conn, DBusMessage *m,
goto fail;
}
if (pa_bluetooth_discovery_get_enable_native_hfp_hf(b->discovery)) {
if (d->enable_hfp_hf) {
if (p == PA_BLUETOOTH_PROFILE_HSP_HS && pa_hashmap_get(d->uuids, PA_BLUETOOTH_UUID_HFP_HF)) {
/* If peer connecting to HSP Audio Gateway supports HFP HF profile
* reject this connection to force it to connect to HSP Audio Gateway instead.