From 4df2f15b06c350a40eb3b6acb520e4fab54a75ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Narajowski?= Date: Wed, 30 Jan 2019 14:50:20 +0100 Subject: [PATCH] mesh: Enforce proper compilation. The current method relies heavily on the linker/compiler to do the correct operation. Which is to eliminate the code that will never get called. This posses a problem if the build even changes by a smallest fraction. The current patch will enforce proper inclusion of the code at the pre-processing stage. Thereby not relying on the compiler/linker to do the right thing. --- nimble/host/mesh/src/prov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/host/mesh/src/prov.c b/nimble/host/mesh/src/prov.c index bc63b38e1..c93926cb7 100644 --- a/nimble/host/mesh/src/prov.c +++ b/nimble/host/mesh/src/prov.c @@ -1095,7 +1095,7 @@ static void prov_data(const u8_t *data) /* After PB-GATT provisioning we should start advertising * using Node Identity. */ - if (identity_enable) { + if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) && identity_enable) { bt_mesh_proxy_identity_enable(); }