mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
bluetooth: Detect changes in constant properties
The D-Bus API should guarantee that some properties remain constant and therefore treat changes in such properties as errors.
This commit is contained in:
parent
b531422218
commit
cd23fbf947
1 changed files with 5 additions and 0 deletions
|
|
@ -367,6 +367,11 @@ static int parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, boo
|
||||||
pa_xfree(d->alias);
|
pa_xfree(d->alias);
|
||||||
d->alias = pa_xstrdup(value);
|
d->alias = pa_xstrdup(value);
|
||||||
} else if (pa_streq(key, "Address")) {
|
} else if (pa_streq(key, "Address")) {
|
||||||
|
if (is_property_change) {
|
||||||
|
pa_log("Device property 'Address' expected to be constant but changed for %s", d->path);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
pa_xfree(d->address);
|
pa_xfree(d->address);
|
||||||
d->address = pa_xstrdup(value);
|
d->address = pa_xstrdup(value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue