Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix random order of interfaces in OpenUSBByName(). #19

Closed

Conversation

godfreychung
Copy link
Contributor

The value of static_interface should be increased for composite devices
only.

The value of static_interface should be increased for composite devices
only.
@LudovicRousseau
Copy link
Owner

The value of static_interface is used only for composite readers. See https://github.com/LudovicRousseau/CCID/blob/master/src/ccid_usb.c#L412

Please describe in details the problem your patch is trying to fix.

@godfreychung
Copy link
Contributor Author

The value of static_interface will be increased if the reader have single interface or multiple interfaces. e.g. static_interface becomes 2 if the reader with single interface is plugged. Then, the driver opens the 2nd interface first if the reader with multiple interfaces is plugged.

LudovicRousseau pushed a commit that referenced this pull request Jun 23, 2016
The value static_interface shall be incremented only for composite devices.
Otherwise any other reader would increase the value and the next
composite reader connected will have its interfaces enumerated in a
different order.

The problem occurs only on Mac OS X (pcscd) that still does not support
composite CCID devices. The CCID driver has to be configured with
--enable-composite-as-multislot and composite CCID devices are
"emulated" as a multi-slot device.

Thanks to Godfrey Chung for the patch
#19
@LudovicRousseau
Copy link
Owner

Fixed in 6123a4c
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants