[Pcsclite-cvs-commit] r6240 - /trunk/Drivers/ccid/src/commands.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Mar 19 09:46:52 UTC 2012


Author: rousseau
Date: Mon Mar 19 09:46:52 2012
New Revision: 6240

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6240
Log:
CCID_Receive(): ICCD type A, wait for device ready

"Here's a fix to make your driver operate in accordance with the ICCD
specification when using Version A control transfers. The status byte is
supposed to indicate when the device has a response ready. So I simply
added a call to CmdGetSlotStatus."

Thanks to John Billings for the patch.

Modified:
    trunk/Drivers/ccid/src/commands.c

Modified: trunk/Drivers/ccid/src/commands.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/commands.c?rev=6240&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/commands.c (original)
+++ trunk/Drivers/ccid/src/commands.c Mon Mar 19 09:46:52 2012
@@ -1209,7 +1209,13 @@
 
 	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
+		unsigned char pcbuffer[SIZE_GET_SLOT_STATUS];
 		int r;
+
+		/* wait for ready */
+		r = CmdGetSlotStatus(reader_index, pcbuffer);
+		if (r != IFD_SUCCESS)
+			return r;
 
 		/* Data Block */
 		r = ControlUSB(reader_index, 0xA1, 0x6F, 0, rx_buffer, *rx_length);




More information about the Pcsclite-cvs-commit mailing list