OSDN Git Service

Fix bug with get report completion due to uninitialized structure
authorMike J. Chen <mjchen@google.com>
Thu, 26 Jun 2014 01:07:03 +0000 (18:07 -0700)
committerMike J. Chen <mjchen@google.com>
Thu, 26 Jun 2014 01:16:20 +0000 (18:16 -0700)
commit011c658b876ea7ca0e0d4b77857dd7160687daad
tree6e6baf47eaafb5b39e3544bdb7f5e2566b89520e
parent4ad470e33021be4246ae539e1bcb7a346dbb4405
Fix bug with get report completion due to uninitialized structure

When LE has received a get report response, it needs to create
a packet to send to the btif_hh_upstreams_evt() handler that
does callback invocation.  The packet it allocated was
not fully initialized.  Specifically, the offset field was not
set, which is used by btif_hh_upstreams_evt() to figure out
where in the data buffer the start of the returned data is.
The uninitialized offset causes garbage to be returned for
anyone using GetReport/SetReport APIs on an LE device.

Change-Id: I4644cd8d6d38308c35b50f99139306a77200d7cd
Signed-off-by: Mike J. Chen <mjchen@google.com>
bta/hh/bta_hh_le.c