Bluetooth: audio: tbs: Add call_alloc/call_free helper functions

This removes duplicated code by adding helper functions to allocate
and free bt_tbs_call objects.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
Mariusz Skamra 2023-07-25 10:10:43 +02:00 committed by Fabio Baltieri
commit 2bb8855467
3 changed files with 53 additions and 64 deletions

View file

@ -1785,7 +1785,7 @@ int bt_tbs_client_originate_call(struct bt_conn *conn, uint8_t inst_index,
if (conn == NULL) {
return -ENOTCONN;
} else if (!bt_tbs_valid_uri(uri)) {
} else if (!bt_tbs_valid_uri(uri, strlen(uri))) {
LOG_DBG("Invalid URI: %s", uri);
return -EINVAL;
}