Skip to content

Commit bf29b2a

Browse files
LoveKarlssonkartben
authored andcommitted
bluetooth: host: Fixed missing guard for BT_SETTINGS_DEFINE
While linking with the IAR linker using generated linker scripts, and with errors if unhandled sections are encountered, many of the bluetooth tests failed because CONFIG_SETTINGS was not set. The section that was not handled was '._settings_handler_static.static.settings_handler_bt_ccc_' Now it's only set if CONFIG_SETTINGS is set. Signed-off-by: Lars-Ove Karlsson <[email protected]>
1 parent dbd0ac4 commit bf29b2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

subsys/bluetooth/host/gatt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5888,6 +5888,7 @@ static int ccc_set(const char *name, size_t len_rd, settings_read_cb read_cb,
58885888
return 0;
58895889
}
58905890

5891+
#ifdef CONFIG_BT_SETTINGS
58915892
static int ccc_set_cb(const char *name, size_t len_rd, settings_read_cb read_cb,
58925893
void *cb_arg)
58935894
{
@@ -5900,6 +5901,7 @@ static int ccc_set_cb(const char *name, size_t len_rd, settings_read_cb read_cb,
59005901
}
59015902

59025903
BT_SETTINGS_DEFINE(ccc, "ccc", ccc_set_cb, NULL);
5904+
#endif /* CONFIG_BT_SETTINGS */
59035905

59045906
static int ccc_set_direct(const char *key, size_t len, settings_read_cb read_cb,
59055907
void *cb_arg, void *param)

0 commit comments

Comments
 (0)