diff options
-rw-r--r-- | src/dbus-hci.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c index bddadcef..4cd2d619 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -955,7 +955,6 @@ void hcid_dbus_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class) const char *paddr = peer_addr; uint32_t old_class = 0; struct adapter *adapter; - GSList *l; struct btd_device *device; const gchar *dev_path; @@ -971,14 +970,11 @@ void hcid_dbus_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class) } ba2str(peer, peer_addr); + device = adapter_find_device(adapter, paddr); - l = g_slist_find_custom(adapter->devices, paddr, - (GCompareFunc) device_address_cmp); - if (!l) + if (!device) return; - device = l->data; - dev_path = device_get_path(device); dbus_connection_emit_property_changed(connection, dev_path, |