libhci update
Iain Hibbert
plunky at rya-online.net
Sat Apr 18 07:52:30 UTC 2009
> thanks for the feedback. i'm attaching revisited patch. please take a
> look and let me know if this is something you happy with.
(pls ignore typos & bad formatting, am on mobile device :)
Bt_devrecv() should probably take void * for buffer? Also manpage suggests it will only receive hci events. Do you think its worth doing some validation of received data? (eg return EIO for truncated reads?)
Bt_devinquiry() should probably restore the filter after use? Also needs to ensure hci event packets are enabled?
Bt_devreq() needs to set/restore a filter too
In bt_devreq structure event should be uint8_t? Also clen and rlen should be size_t
Do you think its worth to cook dev_class into a normalised host numeric value rather than 3 bytes ?
Probably need to specifically mention that the inquiry response to be released using free() in manpage?
Something i thought about on the train yesterday but can't visualise on the small screen. For device inquiry did you consider using a callback method (as per devenum) in stead of returning the structure array? At least i recall my nokia would show the list building (but perhaps that was when it got the names) and this windows mobile device does show the raw list in progress (though stupidly just displays a list of 'unknown device' until it gets the names :)
Regards,
iain
More information about the freebsd-bluetooth
mailing list