diff options
author | Alok Barsode <alok.barsode@azingo.com> | 2008-08-28 18:03:55 +0530 |
---|---|---|
committer | Alok Barsode <alok.barsode@azingo.com> | 2008-08-29 13:53:12 +0530 |
commit | 271183bccb0ac55f7fe3ae6b76211251387e3b5c (patch) | |
tree | da2b7c2c17d83fbb21e472c725bf0f8d6f8b857c /src/dbus-hci.c | |
parent | 5d936ee9bb433445272d3c2a377e42ae4ba5e5ec (diff) |
Adding adapter_update_oor_devices.
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r-- | src/dbus-hci.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 465a1072..63978d84 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -802,8 +802,7 @@ static int found_device_req_name(struct adapter *adapter) /* if failed, request the next element */ /* remove the element from the list */ - adapter->found_devices = g_slist_remove(adapter->found_devices, dev); - g_free(dev); + adapter_remove_found_device(adapter, &dev->bdaddr); /* get the next element */ dev = adapter_search_found_devices(adapter, &match); @@ -834,8 +833,6 @@ static void send_out_of_range(const char *path, GSList *l) void hcid_dbus_inquiry_complete(bdaddr_t *local) { struct adapter *adapter; - struct remote_dev_info *dev; - bdaddr_t tmp; const gchar *path; int state; @@ -850,22 +847,9 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local) /* Out of range verification */ if ((adapter_get_state(adapter) & PERIODIC_INQUIRY) && !(adapter_get_state(adapter) & STD_INQUIRY)) { - GSList *l; send_out_of_range(path, adapter->oor_devices); - - g_slist_foreach(adapter->oor_devices, (GFunc) free, NULL); - g_slist_free(adapter->oor_devices); - adapter->oor_devices = NULL; - - l = adapter->found_devices; - while (l) { - dev = l->data; - baswap(&tmp, &dev->bdaddr); - adapter->oor_devices = g_slist_append(adapter->oor_devices, - batostr(&tmp)); - l = l->next; - } + adapter_update_oor_devices(adapter); } /* |