From 249952efeb3fa27a61d4bb8466f0d3f4dcc86ad9 Mon Sep 17 00:00:00 2001 From: emax Date: Wed, 8 Sep 2010 20:00:27 +0000 Subject: 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 --- usr.sbin/bluetooth/bthidd/hid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.1