Skip to content

Commit fc398ac

Browse files
MariuszSkamracarlescufi
authored andcommitted
Bluetooth: audio: pacs: Fix redundant CCCD attribute without location
This removes the CCCD that was added even if location attribute was not there. Signed-off-by: Mariusz Skamra <[email protected]>
1 parent 77abc49 commit fc398ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

subsys/bluetooth/audio/pacs.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,37 +439,41 @@ BT_GATT_SERVICE_DEFINE(pacs_svc,
439439
BT_GATT_PERM_READ_ENCRYPT,
440440
snk_read, NULL, NULL),
441441
BT_AUDIO_CCC(snk_cfg_changed),
442+
#if defined(CONFIG_BT_PAC_SNK_LOC)
442443
#if defined(CONFIG_BT_PAC_SNK_LOC_WRITEABLE)
443444
BT_AUDIO_CHRC(BT_UUID_PACS_SNK_LOC,
444445
BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_NOTIFY,
445446
BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT,
446447
snk_loc_read, snk_loc_write, NULL),
447-
#elif defined(CONFIG_BT_PAC_SNK_LOC)
448+
#else
448449
BT_AUDIO_CHRC(BT_UUID_PACS_SNK_LOC,
449450
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
450451
BT_GATT_PERM_READ_ENCRYPT,
451452
snk_loc_read, NULL, NULL),
452453
#endif /* CONFIG_BT_PAC_SNK_LOC_WRITEABLE */
453454
BT_AUDIO_CCC(snk_loc_cfg_changed),
455+
#endif /* CONFIG_BT_PAC_SNK_LOC */
454456
#endif /* CONFIG_BT_PAC_SNK */
455457
#if defined(CONFIG_BT_PAC_SRC)
456458
BT_AUDIO_CHRC(BT_UUID_PACS_SRC,
457459
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
458460
BT_GATT_PERM_READ_ENCRYPT,
459461
src_read, NULL, NULL),
460462
BT_AUDIO_CCC(src_cfg_changed),
463+
#if defined(CONFIG_BT_PAC_SRC_LOC)
461464
#if defined(CONFIG_BT_PAC_SRC_LOC_WRITEABLE)
462465
BT_AUDIO_CHRC(BT_UUID_PACS_SRC_LOC,
463466
BT_GATT_CHRC_READ | BT_GATT_CHRC_WRITE | BT_GATT_CHRC_NOTIFY,
464467
BT_GATT_PERM_READ_ENCRYPT | BT_GATT_PERM_WRITE_ENCRYPT,
465468
src_loc_read, src_loc_write, NULL),
466-
#elif defined(CONFIG_BT_PAC_SRC_LOC)
469+
#else
467470
BT_AUDIO_CHRC(BT_UUID_PACS_SRC_LOC,
468471
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
469472
BT_GATT_PERM_READ_ENCRYPT,
470473
src_loc_read, NULL, NULL),
471474
#endif /* CONFIG_BT_PAC_SRC_LOC_WRITEABLE */
472475
BT_AUDIO_CCC(src_loc_cfg_changed),
476+
#endif /* CONFIG_BT_PAC_SRC_LOC */
473477
#endif /* CONFIG_BT_PAC_SRC */
474478
BT_AUDIO_CHRC(BT_UUID_PACS_AVAILABLE_CONTEXT,
475479
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,

0 commit comments

Comments
 (0)