diff options
author | Maksim Yevmenkin <emax@FreeBSD.org> | 2010-09-08 20:00:27 +0000 |
---|---|---|
committer | Maksim Yevmenkin <emax@FreeBSD.org> | 2010-09-08 20:00:27 +0000 |
commit | fc780ca17e21b31c166fe764e1d612949662e853 (patch) | |
tree | 80953c09bbe5aa18842a93dca4ad121a331bc3d9 /usr.sbin/bluetooth/bthidd | |
parent | 87ff4bceb6f207831d3f7b9d5cd9dce7f85869ef (diff) | |
download | src-fc780ca17e21b31c166fe764e1d612949662e853.tar.gz src-fc780ca17e21b31c166fe764e1d612949662e853.zip |
Make sure to only pickup hid_input items when parsing input reports.
As it turns out, libusbhid(3) also picks up hic_collection items even
though we explicitly requested hid_input items only.
Tested by: Buganini < buganini at gmail dot com >
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=212335
Diffstat (limited to 'usr.sbin/bluetooth/bthidd')
-rw-r--r-- | usr.sbin/bluetooth/bthidd/hid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bluetooth/bthidd/hid.c b/usr.sbin/bluetooth/bthidd/hid.c index e9448491e73c..8c0db6ca94a7 100644 --- a/usr.sbin/bluetooth/bthidd/hid.c +++ b/usr.sbin/bluetooth/bthidd/hid.c @@ -160,7 +160,8 @@ hid_interrupt(bthid_session_p s, uint8_t *data, int32_t len) for (d = hid_start_parse(hid_device->desc, 1 << hid_input, -1); hid_get_item(d, &h) > 0; ) { - if ((h.flags & HIO_CONST) || (h.report_ID != report_id)) + if ((h.flags & HIO_CONST) || (h.report_ID != report_id) || + (h.kind != hid_input)) continue; page = HID_PAGE(h.usage); |