Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1b5105d authored by Mike J. Chen's avatar Mike J. Chen
Browse files

Fix HID get_report callback support



There were multiple bugs in the code for get_report event
callback handling:

1) the p_dev lookup was using the wrong argument so was coming
   up with NULL ptr and passing it through to the callback

2) the BT_HDR * was being passed to the callback instead of a
   ptr to the payload

3) the size was being passed as a constant BT_HDR_SIZE.

It looked like this code was expecting the callback to parse
the BT_HDR, but that's an internal bluedroid structure.
The callback is defined as receiving the report data and the
report data size, which this change now provides.

Note that the payload might be NULL if the device returns
a HANDSHAKE error msg instead, and so it is valid to pass
the callback a NULL payload ptr and a 0 size.

Change-Id: I462b5cb5d4c460af085dc6e15f59c778a020a80e
Signed-off-by: default avatarMike J. Chen <mjchen@google.com>
parent a451e1c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment