summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2010-09-08 20:00:27 +0000
committeremax <emax@FreeBSD.org>2010-09-08 20:00:27 +0000
commit249952efeb3fa27a61d4bb8466f0d3f4dcc86ad9 (patch)
tree80953c09bbe5aa18842a93dca4ad121a331bc3d9 /usr.sbin/bluetooth
parent50efad9eda653af31eed649d681d586956d14272 (diff)
downloadFreeBSD-src-249952efeb3fa27a61d4bb8466f0d3f4dcc86ad9.zip
FreeBSD-src-249952efeb3fa27a61d4bb8466f0d3f4dcc86ad9.tar.gz
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
Diffstat (limited to 'usr.sbin/bluetooth')
-rw-r--r--usr.sbin/bluetooth/bthidd/hid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bluetooth/bthidd/hid.c b/usr.sbin/bluetooth/bthidd/hid.c
index e944849..8c0db6c 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);
OpenPOWER on IntegriCloud