nimble/host: Build ble_hs_periodic_sync only when enabled

When periodic advertising support is disabled this code is never used.
This commit is contained in:
Szymon Janc
2019-10-10 08:18:55 +02:00
parent b000924b5d
commit 9f22d249e0
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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);
+2
View File
@@ -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