commit | 96a1f3737584b6b3384d0d5e821e8b7fcae8f2cb | [log] [tgz] |
---|---|---|
author | Nathan Hjelm <hjelmn@google.com> | Fri Aug 09 08:59:27 2019 -0700 |
committer | Nathan Hjelm <hjelmn@google.com> | Fri Aug 09 09:05:02 2019 -0700 |
tree | 81a5fa9316fa7d9b94d09cf39ea0dd481b5707d5 | |
parent | 767eafbf7f93a22ba8d33e77afb11469da597405 [diff] |
darwin: fix bugs in the reenumeration of devices This commit fixes two bugs in device re-enumeration (enumeration after init): - The internal device object (cached device) was being re-used but the user-visible one was not. This would cause the user to get stale data when using the device afer reset. Now the (per libusb spec) the user-visible device object is re-used and updated. - If multiple libusb contexts were active then only the first context was handled correctly. Fixed by moving the cached device search out of process_new_device(). Signed-off-by: Nathan Hjelm <hjelmn@google.com>
libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD and Haiku userspace. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).
libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.
libusb homepage: http://libusb.info/
Developers will wish to consult the API documentation: http://api.libusb.info
Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info
(Please use the mailing list rather than mailing developers directly)