[PATCH v2 4/7] bluetooth: update device's valid flag after parsing properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 f6c18e7..b2abce3 100644
--- a/src/modules/bluetooth/bluez5-util.c
+++ b/src/modules/bluetooth/bluez5-util.c
@@ -775,6 +775,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);
-- 
2.8.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux