This is an automated email from the ASF dual-hosted git repository. janc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit 9f22d249e0c542e34ecc2bf1161904a2ee01e7f4 Author: Szymon Janc <[email protected]> AuthorDate: Wed Oct 9 10:27:25 2019 +0200 nimble/host: Build ble_hs_periodic_sync only when enabled When periodic advertising support is disabled this code is never used. --- nimble/host/src/ble_hs.c | 2 ++ nimble/host/src/ble_hs_periodic_sync.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nimble/host/src/ble_hs.c b/nimble/host/src/ble_hs.c index 969a3e1..2e5451a 100644 --- a/nimble/host/src/ble_hs.c +++ b/nimble/host/src/ble_hs.c @@ -743,8 +743,10 @@ ble_hs_init(void) rc = ble_hs_conn_init(); SYSINIT_PANIC_ASSERT(rc == 0); +#if MYNEWT_VAL(BLE_PERIODIC_ADV) rc = ble_hs_periodic_sync_init(); SYSINIT_PANIC_ASSERT(rc == 0); +#endif rc = ble_l2cap_init(); SYSINIT_PANIC_ASSERT(rc == 0); diff --git a/nimble/host/src/ble_hs_periodic_sync.c b/nimble/host/src/ble_hs_periodic_sync.c index 1a77060..9fad653 100644 --- a/nimble/host/src/ble_hs_periodic_sync.c +++ b/nimble/host/src/ble_hs_periodic_sync.c @@ -24,6 +24,7 @@ #include "host/ble_hs_id.h" #include "ble_hs_priv.h" +#if MYNEWT_VAL(BLE_PERIODIC_ADV) static SLIST_HEAD(, ble_hs_periodic_sync) g_ble_hs_periodic_sync_handles; static struct os_mempool ble_hs_periodic_sync_pool; @@ -150,3 +151,4 @@ ble_hs_periodic_sync_init(void) return 0; } +#endif
