diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-08-20 19:05:10 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-08-20 19:05:10 +0000 |
commit | be52c05a25c0cbadcd605b24d66d0c0b682aee18 (patch) | |
tree | 89abaf343d91156a88500480e75e9cdc3247198e /hcid/dbus.c | |
parent | afa617e410dad21b496539c2c7e89124294f33ae (diff) |
First round of Passkey Release method support
Diffstat (limited to 'hcid/dbus.c')
-rw-r--r-- | hcid/dbus.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hcid/dbus.c b/hcid/dbus.c index ec79a932..269d255d 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -396,6 +396,8 @@ static int unregister_dbus_path(const char *path) cancel_passkey_agent_requests(pdata->passkey_agents, path, NULL); + release_passkey_agents(pdata, NULL); + if (pdata->requestor_name) { name_listener_remove(connection, pdata->requestor_name, (name_cb_t)create_bond_req_exit, pdata); @@ -614,7 +616,7 @@ failed: int hcid_dbus_stop_device(uint16_t id) { char path[MAX_PATH_LENGTH]; - struct hci_dbus_data* pdata; + struct hci_dbus_data *pdata; const char *scan_mode = MODE_OFF; DBusMessage *message; @@ -642,6 +644,8 @@ int hcid_dbus_stop_device(uint16_t id) cancel_passkey_agent_requests(pdata->passkey_agents, path, NULL); + release_passkey_agents(pdata, NULL); + if (pdata->requestor_name) { name_listener_remove(connection, pdata->requestor_name, (name_cb_t)create_bond_req_exit, pdata); @@ -774,6 +778,8 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, const u } } + release_passkey_agents(pdata, peer); + if (!pdata->bonding || bacmp(&pdata->bonding->bdaddr, peer)) goto failed; /* skip: no bonding req pending */ @@ -1412,6 +1418,7 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle } cancel_passkey_agent_requests(pdata->passkey_agents, path, &dev->bdaddr); + release_passkey_agents(pdata, &dev->bdaddr); /* Sent the remote device disconnected signal */ message = dev_signal_factory(pdata->dev_id, "RemoteDeviceDisconnected", @@ -1637,6 +1644,8 @@ void hcid_dbus_exit(void) if (!dbus_connection_get_is_connected(connection)) return; + release_default_agent(); + /* Unregister all paths in Adapter path hierarchy */ if (!dbus_connection_list_registered(connection, BASE_PATH, &children)) goto done; @@ -1983,6 +1992,7 @@ void create_bond_req_exit(const char *name, struct hci_dbus_data *pdata) debug("CreateConnection requestor at %s exited before bonding was completed", name); cancel_passkey_agent_requests(pdata->passkey_agents, path, &pdata->bonding->bdaddr); + release_passkey_agents(pdata, &pdata->bonding->bdaddr); if (pdata->bonding->disconnect) { struct slist *l; |