mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 09:08:06 +00:00
add check for 'can send now' in gatt_client_write_value_of_characteristic_without_response
This commit is contained in:
parent
bb648c73fa
commit
1ae972aa1a
@ -1415,7 +1415,8 @@ le_command_status_t gatt_client_write_value_of_characteristic_without_response(u
|
||||
if (!is_ready(peripheral)) return BLE_PERIPHERAL_IN_WRONG_STATE;
|
||||
|
||||
if (value_length >= peripheral_mtu(peripheral) - 3) return BLE_VALUE_TOO_LONG;
|
||||
|
||||
if (!l2cap_can_send_fixed_channel_packet_now(peripheral->handle)) return BTSTACK_ACL_BUFFERS_FULL;
|
||||
|
||||
peripheral->subclient_id = gatt_client_id;
|
||||
att_write_request(ATT_WRITE_COMMAND, peripheral->handle, value_handle, value_length, value);
|
||||
return BLE_PERIPHERAL_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user