From: Mikel Astiz Date: Tue, 29 Jan 2013 12:10:12 +0000 (+0100) Subject: bluetooth: Detect changes in constant properties X-Git-Tag: v3.99.1~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd23fbf94729a9bb645c7fc784d30d430703f43b;p=platform%2Fupstream%2Fpulseaudio.git 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. --- diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index 5da557a..d10eb97 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); }