mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-14 01:27:41 +00:00
Send complete event in case of disconnection
This commit is contained in:
parent
b398e4aaf1
commit
faab072e58
@ -770,9 +770,8 @@ void gatt_packet_handler(void * connection, uint8_t packet_type, uint16_t channe
|
||||
gatt_client_t * peripheral = get_gatt_client_context_for_handle(handle);
|
||||
if (!peripheral) break;
|
||||
|
||||
// TODO should we send some complete event if transaction pending???
|
||||
|
||||
peripheral->gatt_client_state = P_READY;
|
||||
send_gatt_complete_event(peripheral, 0);
|
||||
linked_list_remove(&gatt_client_connections, (linked_item_t *) peripheral);
|
||||
break;
|
||||
}
|
||||
|
@ -855,7 +855,6 @@ static void daemon_packet_handler(void * connection, uint8_t packet_type, uint16
|
||||
uint16_t handle = READ_BT_16(packet, 3);
|
||||
gatt_client_t *context = get_gatt_client_context_for_handle(handle);
|
||||
if (!context) break;
|
||||
// @TODO return some complete event if request is active
|
||||
gatt_client_stop(context);
|
||||
free(context);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user