mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
bluetooth: Set device_info_valid to -1 when the device's adapter disappears
When parsing device properties, missing adapter will result in device_info_valid being set to -1. It is then logical that if the adapter goes missing at a later point, device_info_valid gets set to -1 also in that situation.
This commit is contained in:
parent
e2dea40f4a
commit
e9d760b555
1 changed files with 3 additions and 1 deletions
|
|
@ -477,8 +477,10 @@ static void adapter_free(pa_bluetooth_adapter *a) {
|
|||
pa_assert(a->discovery);
|
||||
|
||||
PA_HASHMAP_FOREACH(d, a->discovery->devices, state)
|
||||
if (d->adapter == a)
|
||||
if (d->adapter == a) {
|
||||
set_device_info_valid(d, -1);
|
||||
d->adapter = NULL;
|
||||
}
|
||||
|
||||
pa_xfree(a->path);
|
||||
pa_xfree(a->address);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue