android/hidhost: Fix miscalculation of get report event notification length

Event length is size of struct + data len (if any). It is miscalulated.
This commit is contained in:
Ravi kumar Veeramally 2014-01-21 14:24:18 +02:00 committed by Szymon Janc
parent ce7eb5d0c5
commit 9d30a5a539

View File

@ -371,7 +371,7 @@ static void bt_hid_notify_get_report(struct hid_device *dev, uint8_t *buf,
ba2str(&dev->dst, address);
DBG("device %s", address);
ev_len = sizeof(*ev) + sizeof(struct hal_ev_hidhost_get_report) + 1;
ev_len = sizeof(*ev);
if (!((buf[0] == (HID_MSG_DATA | HID_DATA_TYPE_INPUT)) ||
(buf[0] == (HID_MSG_DATA | HID_DATA_TYPE_OUTPUT)) ||