[Patch] Fix collection entry parsing in libusbhid

Markus Brueffer markus at brueffer.de
Wed Feb 15 06:52:27 PST 2006


Hi,

here is a patch for libusbhid which fixes parsing of collection entries if the 
collection has only non-variable Input/Output/Feature entries:

http://people.freebsd.org/~markus/bt/parse.c.diff

The problem ist that the output of collection pages has to be deferred until 
the report id is known. Without the patch, deferred collection pages are only 
reported correctly if variable Input/Output/Feature entries are present.

The effect can be seen here (output of the hid descriptor dump of a Logitech 
MX5000 keyboard using bthidcontrol):

http://people.freebsd.org/~markus/bt/mx5000_before.txt
http://people.freebsd.org/~markus/bt/mx5000_after.txt

Furthermore I have removed the loop in REPORT_SAVED_COLL. If someone knows why 
it was there in the first place, please share your wisdom :)

Third change is the removal of REPORT_SAVED_COLL if the end of a collection is 
reached. All collection entries should have been reported by then.

Ok to commit?

Markus

-- 
Markus Brueffer    | GPG-Key: http://people.FreeBSD.org/~markus/markus.asc
markus at brueffer.de | FP: 3F9B EBE8 F290 E5CC 1447 8760 D48D 1072 78F8 A8D4
markus at FreeBSD.org | FreeBSD: The Power to Serve!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-bluetooth/attachments/20060215/23d61a37/attachment.bin


More information about the freebsd-bluetooth mailing list