mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-14 00:40:57 +00:00
gatt_client: don't forward lower layer events to own clients
This commit is contained in:
parent
dc98f6d35d
commit
f3abff6765
@ -104,6 +104,8 @@ static uint8_t ancs_attribute_id;
|
||||
static uint16_t ancs_attribute_len;
|
||||
static void (*client_handler)(uint8_t packet_type, uint8_t *packet, uint16_t size);
|
||||
|
||||
static btstack_packet_callback_registration_t hci_event_callback_registration;
|
||||
|
||||
void ancs_client_register_callback(void (*handler)(uint8_t packet_type, uint8_t *packet, uint16_t size)){
|
||||
client_handler = handler;
|
||||
}
|
||||
@ -353,5 +355,8 @@ static void handle_gatt_client_event(uint8_t packet_type, uint8_t *packet, uint1
|
||||
}
|
||||
|
||||
void ancs_client_init(void){
|
||||
hci_event_callback_registration.callback = &handle_gatt_client_event;
|
||||
hci_add_event_handler(&hci_event_callback_registration);
|
||||
|
||||
gc_id = gatt_client_register_packet_handler(&handle_gatt_client_event);
|
||||
}
|
||||
|
@ -1054,9 +1054,6 @@ static void gatt_client_hci_event_packet_handler(uint8_t packet_type, uint8_t *p
|
||||
break;
|
||||
}
|
||||
|
||||
// forward all hci events
|
||||
emit_event_to_all_subclients_new(packet, size);
|
||||
|
||||
gatt_client_run();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user