Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c
- index 332d81666..7f49c29eb 100644
- --- a/subsys/bluetooth/host/hci_core.c
- +++ b/subsys/bluetooth/host/hci_core.c
- @@ -788,6 +788,13 @@ static struct bt_conn *find_pending_connect(bt_addr_le_t *peer_addr)
- return bt_conn_lookup_state_le(peer_addr, BT_CONN_CONNECT_DIR_ADV);
- }
- +static void scan_update_work(struct k_work *work)
- +{
- + bt_le_scan_update(false);
- +}
- +
- +static K_WORK_DEFINE(scan_work, scan_update_work);
- +
- static void le_enh_conn_complete(struct bt_hci_evt_le_enh_conn_complete *evt)
- {
- u16_t handle = sys_le16_to_cpu(evt->handle);
- @@ -834,7 +841,11 @@ static void le_enh_conn_complete(struct bt_hci_evt_le_enh_conn_complete *evt)
- bt_conn_set_state(conn, BT_CONN_CONNECT_SCAN);
- }
- - goto done;
- + bt_conn_unref(conn);
- +
- + k_work_submit(&scan_work);
- +
- + return;
- }
Advertisement
Add Comment
Please, Sign In to add comment