aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2011-07-21 13:25:27 -0700
committerJaikumar Ganesh <jaikumar@google.com>2011-07-21 13:28:38 -0700
commit2645460e07951a5c66c24b057c0dafce3f399c63 (patch)
tree89b1c183eff5d96db73c6e0cb090ad0bf08926dd
parent77a8663d5611a914a656ecf375128b4fb83fdf64 (diff)
downloadbluez-2645460e07951a5c66c24b057c0dafce3f399c63.tar.gz
Fix bonding failure error propogation.
When Bonding was failing due to authentication failure, this error report was not being sent to the caller, because cancel_bonding was being called from btd_event_conn_failed, which was sending the wrong error code back. Change-Id: I2816d714fc85c499d0d4850733e33807f3073217
-rw-r--r--plugins/hciops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/hciops.c b/plugins/hciops.c
index b0aa63fe..817a180c 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -2038,7 +2038,6 @@ static inline void conn_failed(int index, bdaddr_t *bdaddr, uint8_t status)
struct dev_info *dev = &devs[index];
struct bt_conn *conn;
- btd_event_conn_failed(&dev->bdaddr, bdaddr, status);
conn = find_connection(dev, bdaddr);
if (conn == NULL)
@@ -2048,6 +2047,8 @@ static inline void conn_failed(int index, bdaddr_t *bdaddr, uint8_t status)
dev->connections = g_slist_remove(dev->connections, conn);
conn_free(conn);
+
+ btd_event_conn_failed(&dev->bdaddr, bdaddr, status);
}
static inline void conn_complete(int index, void *ptr)