1
0
mirror of https://github.com/bluekitchen/btstack.git synced 2025-04-02 16:20:31 +00:00

gatt_client: use can send / request to send from att dispatch

This commit is contained in:
Matthias Ringwald 2023-07-02 12:29:53 +02:00
parent 328bed13c0
commit 4c22687684

@ -1401,7 +1401,7 @@ static void gatt_client_run(void){
while (btstack_linked_list_iterator_has_next(&it_eatt)) { while (btstack_linked_list_iterator_has_next(&it_eatt)) {
gatt_client_t * eatt_client = (gatt_client_t *) btstack_linked_list_iterator_next(&it_eatt); gatt_client_t * eatt_client = (gatt_client_t *) btstack_linked_list_iterator_next(&it_eatt);
if (eatt_client->gatt_client_state != P_READY){ if (eatt_client->gatt_client_state != P_READY){
if (l2cap_can_send_packet_now(eatt_client->l2cap_cid)){ if (att_dispatch_client_can_send_now(gatt_client->con_handle)){
gatt_client_run_for_gatt_client(eatt_client); gatt_client_run_for_gatt_client(eatt_client);
} }
} }
@ -1429,8 +1429,8 @@ static void gatt_client_run(void){
} }
// handle GATT over BR/EDR // handle GATT over BR/EDR
if (l2cap_can_send_packet_now(gatt_client->l2cap_cid) == false){ if (att_dispatch_client_can_send_now(gatt_client->con_handle) == false) {
l2cap_request_can_send_now_event(gatt_client->l2cap_cid); att_dispatch_client_request_can_send_now_event(gatt_client->con_handle);
return; return;
} }
packet_sent = gatt_client_run_for_gatt_client(gatt_client); packet_sent = gatt_client_run_for_gatt_client(gatt_client);