Bluetooth: Add err/reason parameters to connected/disconnected calls

This is essential so that the application can be notified of
connection failures and also be able to know the reason for the
disconnection.

Change-Id: I30108958963f6aeac690612bb26738dc4c67ca80
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-01-14 11:17:32 +02:00 committed by Anas Nashif
commit 432c2db4d8
13 changed files with 109 additions and 56 deletions

View file

@ -215,8 +215,8 @@ uint8_t bt_conn_enc_key_size(struct bt_conn *conn);
/** Connection callback structure */
struct bt_conn_cb {
void (*connected)(struct bt_conn *conn);
void (*disconnected)(struct bt_conn *conn);
void (*connected)(struct bt_conn *conn, uint8_t err);
void (*disconnected)(struct bt_conn *conn, uint8_t reason);
#if defined(CONFIG_BLUETOOTH_SMP)
void (*identity_resolved)(struct bt_conn *conn,
const bt_addr_le_t *rpa,