Hi Matthias,
On Thursday, 13 July 2017 18:53:25 CEST Matthias Janke wrote:
> I've appended a more proper patch to fix this behaviour. It extends
> the argument list of get_strings_and_reopen() and get_strings(). I
> introduced default arguments to make this API-break backwards
> compatible. These could, maybe at a later stage, be removed. Whats
> not clear to me is how to deal with open(struct libusb_device *dev).
> Should in here get_strings_and_reopen() not completely removed?
>
> While this patch tries to minimize the api breakage. I'd suggest to
> join get_strings_and_reopen() and get_strings() and to make them
> private. as they are only useful for vendor(), product() and serial()
> while we should save the used stings in the member variables after
> successfully opening a device based on their usage.
>
> Related to this is there a way in libusb to detect if the string
> descriptor, which is optional, is empty or not available?
thanks for the updated patch! I've quickly browsed it and will take
a look in detail next week. The concept looked sound to me.
The patch will cause a small ABI breakage, so I'll increase
the .so version, too. Nothing to worry about though.
In fact we just need to increase the .so version of
the C++ wrapper, that should cause even less disruption.
Regarding your libusb question: I didn't look at the
libusb API for quite a while, so if it's possible,
it's probably documented somewhere.
Cheers,
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|