mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-17 16:14:15 +00:00
att_db: skip att_read_callback for ATT Read Blob Request if offset == value_len
This commit is contained in:
parent
bd8e4ef6a3
commit
af1b7cdc1f
@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
### Changed
|
### Changed
|
||||||
- Broadcom/Cypress: wait 300 ms after PatchRAM update in hci.c to assert Controller is ready
|
- Broadcom/Cypress: wait 300 ms after PatchRAM update in hci.c to assert Controller is ready
|
||||||
- esp32: provide esp-idf/component/btstack/btstack_port_esp32.c and only minimal app_main in template/main/main.c
|
- esp32: provide esp-idf/component/btstack/btstack_port_esp32.c and only minimal app_main in template/main/main.c
|
||||||
|
- att_db: skip att_read_callback for ATT Read Blob Request if offset == value_len
|
||||||
|
|
||||||
## Changes March 2020
|
## Changes March 2020
|
||||||
|
|
||||||
|
@ -733,13 +733,16 @@ static uint16_t handle_read_blob_request2(att_connection_t * att_connection, uin
|
|||||||
if (value_offset > it.value_len){
|
if (value_offset > it.value_len){
|
||||||
return setup_error_invalid_offset(response_buffer, request_type, handle);
|
return setup_error_invalid_offset(response_buffer, request_type, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// store
|
// prepare response
|
||||||
uint16_t offset = 1;
|
|
||||||
uint16_t bytes_copied = att_copy_value(&it, value_offset, response_buffer + offset, response_buffer_size - offset, att_connection->con_handle);
|
|
||||||
offset += bytes_copied;
|
|
||||||
|
|
||||||
response_buffer[0] = ATT_READ_BLOB_RESPONSE;
|
response_buffer[0] = ATT_READ_BLOB_RESPONSE;
|
||||||
|
uint16_t offset = 1;
|
||||||
|
|
||||||
|
// fetch more data if available
|
||||||
|
if (value_offset < it.value_len){
|
||||||
|
uint16_t bytes_copied = att_copy_value(&it, value_offset, &response_buffer[offset], response_buffer_size - offset, att_connection->con_handle);
|
||||||
|
offset += bytes_copied;
|
||||||
|
}
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user