Bluetooth: host: fix conditional compile for broadcaster role

The call to bt_adv_reset_adv_pool is only required in the
broadcaster role, and not in the observer role, regardless
of the setting of CONFIG_BT_EXT_ADV
As the code was this call was also made for the observer.

Note: handling of the setting of CONFIG_BT_EXT_ADV
is already handled in the bt_adv_reset_adv_pool function

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
This commit is contained in:
Andries Kruithof 2023-01-12 14:55:07 +01:00 committed by Carles Cufí
commit 1200fd9314

View file

@ -3796,9 +3796,9 @@ int bt_disable(void)
bt_monitor_send(BT_MONITOR_CLOSE_INDEX, NULL, 0);
#if defined(CONFIG_BT_EXT_ADV) || defined(CONFIG_BT_BROADCASTER)
#if defined(CONFIG_BT_BROADCASTER)
bt_adv_reset_adv_pool();
#endif /* CONFIG_BT_EXT_ADV || CONFIG_BT_BROADCASTER */
#endif /* CONFIG_BT_BROADCASTER */
#if defined(CONFIG_BT_PRIVACY)
k_work_cancel_delayable(&bt_dev.rpa_update);