Skip to content

Commit 3f19a2e

Browse files
Vudentznashif
authored andcommitted
Bluetooth: GATT: Fix assert when storying CCCs
This fixes the following crash: ASSERTION FAIL [0] @ ZEPHYR_BASE/subsys/logging/log_core.c:180 argument 2 in log message "%s: Stored CCCs for %s (%s)" missing log_strdup(). Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 0d5640e commit 3f19a2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/bluetooth/host/gatt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3231,7 +3231,8 @@ int bt_gatt_store_ccc(u8_t id, const bt_addr_le_t *addr)
32313231
return err;
32323232
}
32333233

3234-
BT_DBG("Stored CCCs for %s (%s)", bt_addr_le_str(addr), key);
3234+
BT_DBG("Stored CCCs for %s (%s)", bt_addr_le_str(addr),
3235+
log_strdup(key));
32353236
if (len) {
32363237
for (int i = 0; i < save.count; i++) {
32373238
BT_DBG(" CCC: handle 0x%04x value 0x%04x",

0 commit comments

Comments
 (0)