summaryrefslogtreecommitdiff
path: root/src/modules/bluetooth/bluetooth-util.c
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2013-01-29 13:10:12 +0100
committerTanu Kaskinen <tanuk@iki.fi>2013-01-31 09:31:59 +0200
commitcd23fbf94729a9bb645c7fc784d30d430703f43b (patch)
treef7b6f969ce393f0c58dfd6d7bfa2ab86c1b93aec /src/modules/bluetooth/bluetooth-util.c
parentb531422218d736ba0594fce7308d582b6c37c814 (diff)
downloadpulseaudio-cd23fbf94729a9bb645c7fc784d30d430703f43b.tar.gz
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.
Diffstat (limited to 'src/modules/bluetooth/bluetooth-util.c')
-rw-r--r--src/modules/bluetooth/bluetooth-util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index 5da557a79..d10eb97cb 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -367,6 +367,11 @@ static int parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, boo
pa_xfree(d->alias);
d->alias = pa_xstrdup(value);
} 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);
d->address = pa_xstrdup(value);
}