l2cap: fix emitted L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST

This commit is contained in:
Matthias Ringwald 2018-08-23 12:08:14 +02:00
parent 3342e387bb
commit f299206d43
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- GATT Server: Allow enable Notifications/Indication with Write Command. Fixes issue with some Android devices.
- SM: fix pairing for Secure Connections with Bonding if remote sends additional keys
- SM: drop LTK flag from Pairing Response for Secure Connections
- L2CAP: fix emitted L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST
## Changes June 2018

View File

@ -2750,7 +2750,7 @@ static void l2cap_emit_connection_parameter_update_response(hci_con_handle_t con
static int l2cap_le_signaling_handler_dispatch(hci_con_handle_t handle, uint8_t * command, uint8_t sig_id){
hci_connection_t * connection;
uint16_t result;
uint8_t event[10];
uint8_t event[12];
#ifdef ENABLE_LE_DATA_CHANNELS
btstack_linked_list_iterator_t it;
@ -2802,7 +2802,8 @@ static int l2cap_le_signaling_handler_dispatch(hci_con_handle_t handle, uint8_t
event[0] = L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST;
event[1] = 8;
memcpy(&event[2], &command[4], 8);
little_endian_store_16(event, 2, handle);
memcpy(&event[4], &command[4], 8);
hci_dump_packet( HCI_EVENT_PACKET, 0, event, sizeof(event));
(*l2cap_event_packet_handler)( HCI_EVENT_PACKET, 0, event, sizeof(event));
break;