diff --git a/CHANGELOG.md b/CHANGELOG.md index 86d0950e0..e240909f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - GAP: allow use of own address type different from gap_random_set_mode() incl. RPA in LE Extended Advertising - SM: abort pairing with invalid parameter error for encryption key size > 16 - ATT Server: support delayed read responses for registered services +- ATT Server: allow to start crypto operation from delayed att read/write request - HFP HF: send HF Indicator update only if enabled by AG ### Changed diff --git a/src/ble/att_server.c b/src/ble/att_server.c index 1cde8c941..3a35faff6 100644 --- a/src/ble/att_server.c +++ b/src/ble/att_server.c @@ -586,6 +586,11 @@ att_server_process_validated_request(att_server_t *att_server, att_connection_t #ifdef ENABLE_ATT_DELAYED_RESPONSE if ((att_response_size == ATT_READ_RESPONSE_PENDING) || (att_response_size == ATT_INTERNAL_WRITE_RESPONSE_PENDING)){ + // free reserved buffer + if (eatt_buffer == NULL){ + l2cap_release_packet_buffer(); + } + // update state att_server->state = ATT_SERVER_RESPONSE_PENDING; @@ -608,11 +613,6 @@ att_server_process_validated_request(att_server_t *att_server, att_connection_t (*att_server_client_read_callback)(att_connection->con_handle, ATT_READ_RESPONSE_PENDING, 0, NULL, 0); } } - - // free reserved buffer - if (eatt_buffer == NULL){ - l2cap_release_packet_buffer(); - } return 0; } #endif