mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-25 16:43:28 +00:00
ble: fix compile ifndef ENABLE_CLASSIC
This commit is contained in:
parent
1a2f82330a
commit
b3264428f7
@ -790,8 +790,10 @@ static void acl_handler(uint8_t *packet, int size){
|
||||
static void hci_shutdown_connection(hci_connection_t *conn){
|
||||
log_info("Connection closed: handle 0x%x, %s", conn->con_handle, bd_addr_to_str(conn->address));
|
||||
|
||||
#ifdef ENABLE_CLASSIC
|
||||
#ifdef ENABLE_SCO_OVER_HCI
|
||||
int addr_type = conn->address_type;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
btstack_run_loop_remove_timer(&conn->timeout);
|
||||
@ -802,12 +804,14 @@ static void hci_shutdown_connection(hci_connection_t *conn){
|
||||
// now it's gone
|
||||
hci_emit_nr_connections_changed();
|
||||
|
||||
#ifdef ENABLE_CLASSIC
|
||||
#ifdef ENABLE_SCO_OVER_HCI
|
||||
// update SCO
|
||||
if (addr_type == BD_ADDR_TYPE_SCO && hci_stack->hci_transport && hci_stack->hci_transport->set_sco_config){
|
||||
hci_stack->hci_transport->set_sco_config(hci_stack->sco_voice_setting_active, hci_number_sco_connections());
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_CLASSIC
|
||||
|
@ -569,9 +569,11 @@ static void l2cap_run(void){
|
||||
|
||||
uint8_t sig_id = signaling_responses[0].sig_id;
|
||||
uint8_t response_code = signaling_responses[0].code;
|
||||
uint16_t source_cid = signaling_responses[0].cid; // CONNECTION_REQUEST
|
||||
uint16_t infoType = signaling_responses[0].data; // INFORMATION_REQUEST
|
||||
uint16_t result = signaling_responses[0].data; // CONNECTION_REQUEST, COMMAND_REJECT
|
||||
#ifdef ENABLE_CLASSIC
|
||||
uint16_t source_cid = signaling_responses[0].cid; // CONNECTION_REQUEST
|
||||
#endif
|
||||
UNUSED(infoType);
|
||||
|
||||
// remove first item before sending (to avoid sending response mutliple times)
|
||||
|
Loading…
x
Reference in New Issue
Block a user