Skip to content

Commit

Permalink
Bluetooth: Host: Send status for terminated directed adv
Browse files Browse the repository at this point in the history
- Fix bug where status was only sent for legacy adv

Signed-off-by: Alexander Svensen <[email protected]>
  • Loading branch information
alexsven authored and fabiobaltieri committed Feb 8, 2024
1 parent 30ccd55 commit 199487b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions subsys/bluetooth/host/adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2185,11 +2185,10 @@ void bt_hci_le_adv_set_terminated(struct net_buf *buf)

if (evt->status && IS_ENABLED(CONFIG_BT_PERIPHERAL) &&
atomic_test_bit(adv->flags, BT_ADV_CONNECTABLE)) {
/* Only set status for legacy advertising API.
* This will call connected callback for high duty cycle
/* This will call connected callback for high duty cycle
* directed advertiser timeout.
*/
le_adv_stop_free_conn(adv, adv == bt_dev.adv ? evt->status : 0);
le_adv_stop_free_conn(adv, evt->status);
}

if (IS_ENABLED(CONFIG_BT_CONN) && !evt->status) {
Expand Down

0 comments on commit 199487b

Please sign in to comment.