Setting correct length for BTSTACK_EVENT_STATE event.

The second byte of the data is the length of the remaining data (in this case the HCI_STATE_WORKING byte). This was passing 0 indicating that there was no data when in fact there was.
This commit is contained in:
Pete Blois 2015-03-30 13:17:10 -07:00
parent 0f6940d34d
commit a2366dc9d3

View File

@ -1365,7 +1365,7 @@ static void sm_handle_encryption_result(uint8_t * data){
// SM INIT FINISHED, start application code - TODO untangle that
if (sm_client_packet_handler)
{
uint8_t event[] = { BTSTACK_EVENT_STATE, 0, HCI_STATE_WORKING };
uint8_t event[] = { BTSTACK_EVENT_STATE, 1, HCI_STATE_WORKING };
sm_client_packet_handler(HCI_EVENT_PACKET, 0, (uint8_t*) event, sizeof(event));
}
return;