This is an automated email from the ASF dual-hosted git repository. rymek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit eacdbc36e020a270181a7c8bf36dd352beec4d13 Author: Mariusz Skamra <[email protected]> AuthorDate: Fri Feb 23 09:39:52 2024 +0100 nimble/iso: Fix missing BLE_ISO_BROADCAST_SOURCE guard This makes Broadcast ISO source related code dependent on BLE_ISO_BROADCAST_SOURCE mynewt option. --- nimble/host/src/ble_iso.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/nimble/host/src/ble_iso.c b/nimble/host/src/ble_iso.c index 271bd27cb..90bd613d0 100644 --- a/nimble/host/src/ble_iso.c +++ b/nimble/host/src/ble_iso.c @@ -225,6 +225,7 @@ ble_iso_big_free(struct ble_iso_big *big) return 0; } +#if MYNEWT_VAL(BLE_ISO_BROADCAST_SOURCE) int ble_iso_create_big(const struct ble_iso_create_big_params *create_params, const struct ble_iso_big_params *big_params) @@ -298,28 +299,6 @@ ble_iso_terminate_big(uint8_t big_handle) return rc; } -int -ble_iso_init(void) -{ - int rc; - - SLIST_INIT(&ble_iso_bigs); - - rc = os_mempool_init(&ble_iso_big_pool, - MYNEWT_VAL(BLE_MAX_BIG), - sizeof (struct ble_iso_big), - ble_iso_big_mem, "ble_iso_big_pool"); - SYSINIT_PANIC_ASSERT(rc == 0); - - rc = os_mempool_init(&ble_iso_bis_pool, - MYNEWT_VAL(BLE_MAX_BIS), - sizeof (struct ble_iso_bis), - ble_iso_bis_mem, "ble_iso_bis_pool"); - SYSINIT_PANIC_ASSERT(rc == 0); - - return 0; -} - void ble_iso_rx_create_big_complete(const struct ble_hci_ev_le_subev_create_big_complete *ev) { @@ -497,6 +476,7 @@ ble_iso_tx(uint16_t conn_handle, void *data, uint16_t data_len) return rc; } +#endif /* BLE_ISO_BROADCAST_SOURCE */ #if MYNEWT_VAL(BLE_ISO_BROADCAST_SINK) static struct ble_iso_conn * @@ -933,4 +913,26 @@ ble_iso_data_path_remove(const struct ble_iso_data_path_remove_params *param) return rc; } + +int +ble_iso_init(void) +{ + int rc; + + SLIST_INIT(&ble_iso_bigs); + + rc = os_mempool_init(&ble_iso_big_pool, + MYNEWT_VAL(BLE_MAX_BIG), + sizeof (struct ble_iso_big), + ble_iso_big_mem, "ble_iso_big_pool"); + SYSINIT_PANIC_ASSERT(rc == 0); + + rc = os_mempool_init(&ble_iso_bis_pool, + MYNEWT_VAL(BLE_MAX_BIS), + sizeof (struct ble_iso_bis), + ble_iso_bis_mem, "ble_iso_bis_pool"); + SYSINIT_PANIC_ASSERT(rc == 0); + + return 0; +} #endif /* BLE_ISO */
