Skip to content

Commit c49a058

Browse files
Thalleyfabiobaltieri
authored andcommitted
Bluetooth: TBS: Fix type of uri in call_alloc
The function had marked the type as char *, but it was in fact not a string but rather a uint8_t array. Marked the type properly and added a cast when using it with bt_tbs_remote_incoming. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
1 parent f500f7c commit c49a058

File tree

1 file changed

+3
-3
lines changed
  • subsys/bluetooth/audio

1 file changed

+3
-3
lines changed

subsys/bluetooth/audio/tbs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ static uint8_t next_free_call_index(void)
345345
return BT_TBS_FREE_CALL_INDEX;
346346
}
347347

348-
static struct bt_tbs_call *call_alloc(struct tbs_service_inst *inst, uint8_t state, const char *uri,
349-
uint16_t uri_len)
348+
static struct bt_tbs_call *call_alloc(struct tbs_service_inst *inst, uint8_t state,
349+
const uint8_t *uri, uint16_t uri_len)
350350
{
351351
struct bt_tbs_call *free_call = NULL;
352352

@@ -1947,7 +1947,7 @@ int bt_tbs_remote_incoming(uint8_t bearer_index, const char *to,
19471947

19481948
service_inst = CONTAINER_OF(inst, struct tbs_service_inst, inst);
19491949

1950-
call = call_alloc(service_inst, BT_TBS_CALL_STATE_INCOMING, from, strlen(from));
1950+
call = call_alloc(service_inst, BT_TBS_CALL_STATE_INCOMING, (uint8_t *)from, strlen(from));
19511951
if (call == NULL) {
19521952
return -ENOMEM;
19531953
}

0 commit comments

Comments
 (0)