summaryrefslogtreecommitdiffstats
path: root/src/dbus-hci.c
diff options
context:
space:
mode:
authorAlok Barsode <alok.barsode@azingo.com>2008-09-03 14:46:51 +0530
committerAlok Barsode <alok.barsode@azingo.com>2008-09-03 14:46:51 +0530
commit8db3d79c2b3f760d1179d24582a6124525cc99bc (patch)
treea930d82e7d80123c47e01dac1b9526679cdc6c1a /src/dbus-hci.c
parent0502c569a87101fdcb79d9f772156daa3f744baa (diff)
fixing dbus-hci.c to use adapter_find_device.
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r--src/dbus-hci.c8
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,