From 570288ccc9e2ce50c270125020353c0899a29b55 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sun, 7 Aug 2016 18:45:51 +0300 Subject: [PATCH] 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). --- src/modules/bluetooth/bluez5-util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c index e4cf04479..890b8ecc1 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);