mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
att_server: check handle in disconnection complete event
This commit is contained in:
parent
c6a37cfdba
commit
70a390c7e0
@ -174,11 +174,11 @@ static void att_event_packet_handler (uint8_t packet_type, uint16_t channel, uin
|
||||
break;
|
||||
|
||||
case HCI_EVENT_DISCONNECTION_COMPLETE:
|
||||
// check handle
|
||||
if (att_connection.con_handle != hci_event_disconnection_complete_get_connection_handle(packet)) break;
|
||||
att_clear_transaction_queue(&att_connection);
|
||||
att_connection.con_handle = 0;
|
||||
att_handle_value_indication_handle = 0; // reset error state
|
||||
// restart advertising if we have been connected before
|
||||
// -> avoid sending advertise enable a second time before command complete was received
|
||||
att_server_state = ATT_SERVER_IDLE;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user