From 4a2884b018974494268db19f73770985d0f26245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Narajowski?= Date: Wed, 30 Jan 2019 14:48:11 +0100 Subject: [PATCH] mesh: Fix incorrect reference to BT_SETTINGS The test for IS_ENABLED(BT_SETTINGS) in mod_reset() should be IS_ENABLED(CONFIG_BT_SETTINGS). --- nimble/host/mesh/include/mesh/glue.h | 1 - nimble/host/mesh/src/cfg_srv.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/nimble/host/mesh/include/mesh/glue.h b/nimble/host/mesh/include/mesh/glue.h index f173f3047..a4ada7967 100644 --- a/nimble/host/mesh/include/mesh/glue.h +++ b/nimble/host/mesh/include/mesh/glue.h @@ -351,7 +351,6 @@ static inline unsigned int find_msb_set(u32_t op) #define CONFIG_BT_TESTING BLE_MESH_TESTING #define CONFIG_BT_SETTINGS BLE_MESH_SETTINGS #define CONFIG_SETTINGS BLE_MESH_SETTINGS -#define BT_SETTINGS BLE_MESH_SETTINGS /* Above flags are used with IS_ENABLED macro */ #define IS_ENABLED(config) MYNEWT_VAL(config) diff --git a/nimble/host/mesh/src/cfg_srv.c b/nimble/host/mesh/src/cfg_srv.c index 0901e6d45..f9f871ee6 100644 --- a/nimble/host/mesh/src/cfg_srv.c +++ b/nimble/host/mesh/src/cfg_srv.c @@ -3410,7 +3410,7 @@ static void mod_reset(struct bt_mesh_model *mod, struct bt_mesh_elem *elem, mod_sub_list_clear(mod); - if (IS_ENABLED(BT_SETTINGS)) { + if (IS_ENABLED(CONFIG_BT_SETTINGS)) { bt_mesh_store_mod_sub(mod); } }