[Pcsclite-git-commit] [CCID] 01/01: Fix fake composite device code to use a fixed order

Ludovic Rousseau rousseau at moszumanska.debian.org
Thu Jun 23 18:07:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository CCID.

commit 6123a4cc07a2c5b980021c70b89f02da96ee855a
Author: Godfrey Chung <godfrey.chung at acs.com.hk>
Date:   Wed Jun 22 10:46:37 2016 +0800

    Fix fake composite device code to use a fixed order
    
    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
    https://github.com/LudovicRousseau/CCID/pull/19
---
 src/ccid_usb.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/ccid_usb.c b/src/ccid_usb.c
index 16e870d..636c198 100644
--- a/src/ccid_usb.c
+++ b/src/ccid_usb.c
@@ -622,12 +622,17 @@ again:
 				}
 
 #ifdef USE_COMPOSITE_AS_MULTISLOT
-				/* use the next interface for the next "slot" */
-				static_interface++;
+				if ((GEMALTOPROXDU == readerID)
+					|| (GEMALTOPROXSU == readerID)
+					|| (FEITIANR502DUAL == readerID))
+				{
+					/* use the next interface for the next "slot" */
+					static_interface++;
 
-				/* reset for a next reader */
-				if (static_interface > 2)
-					static_interface = (FEITIANR502DUAL == readerID) ? 0: 1;
+					/* reset for a next reader */
+					if (static_interface > 2)
+						static_interface = (FEITIANR502DUAL == readerID) ? 0: 1;
+				}
 #endif
 
 				/* Get Endpoints values*/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git



More information about the Pcsclite-cvs-commit mailing list