Bluetooth: audio: pacs: Fix PACS notification
This fixes sending PACS notification with buffer containing invalid, uninitialized data. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
c707f1ed28
commit
8500eb1335
1 changed files with 4 additions and 0 deletions
|
@ -570,6 +570,8 @@ static void pac_notify(struct k_work *work)
|
||||||
|
|
||||||
#if defined(CONFIG_BT_PAC_SNK)
|
#if defined(CONFIG_BT_PAC_SNK)
|
||||||
if (work == &snks_work.work) {
|
if (work == &snks_work.work) {
|
||||||
|
get_pac_records(NULL, BT_AUDIO_DIR_SINK, &read_buf);
|
||||||
|
|
||||||
err = bt_gatt_notify_uuid(NULL, BT_UUID_PACS_SNK,
|
err = bt_gatt_notify_uuid(NULL, BT_UUID_PACS_SNK,
|
||||||
pacs_svc.attrs, read_buf.data,
|
pacs_svc.attrs, read_buf.data,
|
||||||
read_buf.len);
|
read_buf.len);
|
||||||
|
@ -578,6 +580,8 @@ static void pac_notify(struct k_work *work)
|
||||||
|
|
||||||
#if defined(CONFIG_BT_PAC_SRC)
|
#if defined(CONFIG_BT_PAC_SRC)
|
||||||
if (work == &srcs_work.work) {
|
if (work == &srcs_work.work) {
|
||||||
|
get_pac_records(NULL, BT_AUDIO_DIR_SOURCE, &read_buf);
|
||||||
|
|
||||||
err = bt_gatt_notify_uuid(NULL, BT_UUID_PACS_SRC,
|
err = bt_gatt_notify_uuid(NULL, BT_UUID_PACS_SRC,
|
||||||
pacs_svc.attrs, read_buf.data,
|
pacs_svc.attrs, read_buf.data,
|
||||||
read_buf.len);
|
read_buf.len);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue