summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hcid/dbus-security.c2
-rw-r--r--hcid/dbus.c11
-rw-r--r--hcid/dbus.h1
3 files changed, 3 insertions, 11 deletions
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index 507a6475..3ad09f2e 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -483,8 +483,6 @@ int handle_passkey_request(DBusConnection *conn, int dev, const char *path, bdad
adapter = data;
- adapter->pairing_active = 1;
-
ba2str(dba, addr);
for (l = adapter->passkey_agents; l != NULL; l = l->next) {
diff --git a/hcid/dbus.c b/hcid/dbus.c
index c3e8a6ba..17f5c0f9 100644
--- a/hcid/dbus.c
+++ b/hcid/dbus.c
@@ -615,12 +615,6 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, const u
goto failed;
}
- /* Don't send any signals if a pairing process isn't active */
- if (!pdata->pairing_active)
- return;
-
- pdata->pairing_active = 0;
-
/*
* 0x00: authentication request successfully completed
* 0x01-0x0F: authentication request failed
@@ -633,7 +627,7 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, const u
send_reply_and_unref(connection, message);
- if (!pdata->bonding)
+ if (!pdata->bonding || bacmp(&pdata->bonding->bdaddr, peer))
goto failed; /* skip: no bonding req pending */
if (pdata->bonding->disconnect) {
@@ -1226,7 +1220,8 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle
hci_req_queue_remove(pdata->dev_id, &dev->bdaddr);
/* Check if there is a pending Bonding */
- if (pdata->bonding) {
+ if (pdata->bonding && (bacmp(&pdata->bonding->bdaddr, &dev->bdaddr) == 0)) {
+
message = dev_signal_factory(pdata->dev_id, "BondingFailed",
DBUS_TYPE_STRING, &peer_addr,
DBUS_TYPE_INVALID);
diff --git a/hcid/dbus.h b/hcid/dbus.h
index 5e6927b6..e4d8b963 100644
--- a/hcid/dbus.h
+++ b/hcid/dbus.h
@@ -109,7 +109,6 @@ struct hci_dbus_data {
struct slist *passkey_agents;
struct bonding_request_info *bonding;
struct slist *active_conn;
- int pairing_active;
};
struct passkey_agent {