summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2016-08-07 18:45:51 +0300
committerTanu Kaskinen <tanuk@iki.fi>2016-08-10 21:37:33 +0300
commit570288ccc9e2ce50c270125020353c0899a29b55 (patch)
tree4a8b8c87e22bd4b36633e80876e3386335642270
parenteec4d29247386a33d8c2b94a16de8f9ccf63c563 (diff)
bluetooth: update device's valid flag after parsing properties
The properties_received flag affects whether the device should be considered valid, so let's update the valid flag after setting the properties_received flag. There's a call to device_update_valid() anyway later when setting the device adapters, so this change isn't strictly necessary, but this makes it more obvious that the code is correct (and less fragile).
-rw-r--r--src/modules/bluetooth/bluez5-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
index e4cf0447..890b8ecc 100644
--- a/src/modules/bluetooth/bluez5-util.c
+++ b/src/modules/bluetooth/bluez5-util.c
@@ -773,6 +773,7 @@ static void parse_device_properties(pa_bluetooth_device *d, DBusMessageIter *i)
if (!d->properties_received) {
d->properties_received = true;
+ device_update_valid(d);
if (!d->address || !d->adapter_path || !d->alias)
pa_log_error("Non-optional information missing for device %s", d->path);