Bluetooth: audio: tbs: Fix List_Item_Length value in CCL

This fixes setting invalid List_Item_Length in Current Calls List.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
Mariusz Skamra
2022-08-17 14:45:05 +02:00
committed by Carles Cufí
parent 3253ad2ab8
commit 9c7ef8ea06

View File

@@ -400,10 +400,9 @@ static void net_buf_put_current_calls(const void *inst_p)
continue;
}
uri_length = strlen(call->remote_uri);
item_len = sizeof(call->index != BT_TBS_FREE_CALL_INDEX) +
sizeof(call->state) +
sizeof(call->flags) +
uri_length;
item_len = sizeof(call->index) + sizeof(call->state) +
sizeof(call->flags) + uri_length;
net_buf_simple_add_u8(&read_buf, item_len);
net_buf_simple_add_u8(&read_buf, call->index);
net_buf_simple_add_u8(&read_buf, call->state);