Guest User

Untitled

a guest
Oct 1st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c
  2. index 332d81666..7f49c29eb 100644
  3. --- a/subsys/bluetooth/host/hci_core.c
  4. +++ b/subsys/bluetooth/host/hci_core.c
  5. @@ -788,6 +788,13 @@ static struct bt_conn *find_pending_connect(bt_addr_le_t *peer_addr)
  6. return bt_conn_lookup_state_le(peer_addr, BT_CONN_CONNECT_DIR_ADV);
  7. }
  8.  
  9. +static void scan_update_work(struct k_work *work)
  10. +{
  11. + bt_le_scan_update(false);
  12. +}
  13. +
  14. +static K_WORK_DEFINE(scan_work, scan_update_work);
  15. +
  16. static void le_enh_conn_complete(struct bt_hci_evt_le_enh_conn_complete *evt)
  17. {
  18. u16_t handle = sys_le16_to_cpu(evt->handle);
  19. @@ -834,7 +841,11 @@ static void le_enh_conn_complete(struct bt_hci_evt_le_enh_conn_complete *evt)
  20. bt_conn_set_state(conn, BT_CONN_CONNECT_SCAN);
  21. }
  22.  
  23. - goto done;
  24. + bt_conn_unref(conn);
  25. +
  26. + k_work_submit(&scan_work);
  27. +
  28. + return;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment