mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-04 06:39:53 +00:00
avrcp: allow to pass NULL as connection cid output parameter
This commit is contained in:
parent
dba24ced98
commit
dd5e598191
@ -674,9 +674,10 @@ uint8_t avrcp_connect(bd_addr_t bd_addr, avrcp_context_t * context, uint16_t * a
|
||||
return BTSTACK_MEMORY_ALLOC_FAILED;
|
||||
}
|
||||
|
||||
if (!avrcp_cid) return L2CAP_LOCAL_CID_DOES_NOT_EXIST;
|
||||
|
||||
*avrcp_cid = connection->avrcp_cid;
|
||||
if (avrcp_cid){
|
||||
*avrcp_cid = connection->avrcp_cid;
|
||||
}
|
||||
|
||||
connection->state = AVCTP_CONNECTION_W4_SDP_QUERY_COMPLETE;
|
||||
|
||||
context->avrcp_l2cap_psm = 0;
|
||||
|
@ -155,9 +155,10 @@ static uint8_t avrcp_browsing_connect(bd_addr_t remote_addr, avrcp_context_t * c
|
||||
return BTSTACK_MEMORY_ALLOC_FAILED;
|
||||
}
|
||||
|
||||
if (!browsing_cid) return L2CAP_LOCAL_CID_DOES_NOT_EXIST;
|
||||
|
||||
*browsing_cid = avrcp_connection->avrcp_browsing_cid;
|
||||
if (browsing_cid){
|
||||
*browsing_cid = avrcp_connection->avrcp_browsing_cid;
|
||||
}
|
||||
|
||||
connection->ertm_buffer = ertm_buffer;
|
||||
connection->ertm_buffer_size = size;
|
||||
avrcp_connection->browsing_connection = connection;
|
||||
|
@ -226,9 +226,10 @@ static uint8_t avrcp_browsing_connect(bd_addr_t remote_addr, avrcp_context_t * c
|
||||
return BTSTACK_MEMORY_ALLOC_FAILED;
|
||||
}
|
||||
|
||||
if (!browsing_cid) return L2CAP_LOCAL_CID_DOES_NOT_EXIST;
|
||||
if (browsing_cid){
|
||||
*browsing_cid = avrcp_connection->avrcp_browsing_cid;
|
||||
}
|
||||
|
||||
*browsing_cid = avrcp_connection->avrcp_browsing_cid;
|
||||
connection->ertm_buffer = ertm_buffer;
|
||||
connection->ertm_buffer_size = size;
|
||||
avrcp_connection->browsing_connection = connection;
|
||||
|
Loading…
x
Reference in New Issue
Block a user