[PATCH] main: Always use libusb context
stefan at datenfreihafen.org
Wed Aug 31 22:51:44 CEST 2011
On Wed, 2011-08-31 at 21:34, Tormod Volden wrote:
> On Wed, Aug 31, 2011 at 7:20 PM, Stefan Schmidt wrote:
> > Patch looks fine. Just wondering if you hit any problems without the
> > context being set? Or did you do the change based on the comment that
> > the context needs to be set?
> No, it was just to make it consistent. The context was being used some
> places and some places not. Well, I saw the comment and wondered why
> it was not used at that very spot , but I guess it was because there
> was some work to have the context passed through the whole chain of
> functions :)
Yeah, a bit of lazyness on my side. :)
> The alternative would be to not use the context anywhere. It is not so
> useful for a small, free-standing program. But it follows the book,
> and if at some point the code will be embedded in a bigger program
> doing other libusb stuff, it can only help.
> > I'm just curious as I wrote the comment but haven't ben totally sure
> > if its needed or we are fine with the default context (used if set to
> > NULL).
> > Besides that it looks fine and I'm going to apply it after some
> > testing.
> Thanks, another bunch of patches will come soon.
Great. This one was applied and pushed after testing showed no
Thanks for it.
More information about the devel