From 8db3d79c2b3f760d1179d24582a6124525cc99bc Mon Sep 17 00:00:00 2001 From: Alok Barsode Date: Wed, 3 Sep 2008 14:46:51 +0530 Subject: fixing dbus-hci.c to use adapter_find_device. --- src/dbus-hci.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') 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, -- cgit