[Pcsclite-cvs-commit] CVS Drivers/ccid/src

CVS User rousseau ludovic.rousseau@free.fr
Wed, 08 Sep 2004 14:41:26 -0600


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv6376

Modified Files:
	commands.c 
Log Message:
switch the Cherry xx33 reader in ISO mode if power up in EMV mode fails.
Thanks to Stéphane Durand for the bug report.


--- /cvsroot/pcsclite/Drivers/ccid/src/commands.c	2004/09/03 19:39:34	1.29
+++ /cvsroot/pcsclite/Drivers/ccid/src/commands.c	2004/09/08 20:41:24	1.30
@@ -18,7 +18,7 @@
 */
 
 /*
- * $Id: commands.c,v 1.29 2004/09/03 19:39:34 rousseau Exp $
+ * $Id: commands.c,v 1.30 2004/09/08 20:41:24 rousseau Exp $
  */
 
 #include <string.h>
@@ -106,9 +106,9 @@
 	{
 		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
 
-		/* Protocol error in EMV mode */
-		if (buffer[ERROR_OFFSET] == 0xBB &&
-			ccid_descriptor->readerID == GEMPC433)
+		if (0xBB == buffer[ERROR_OFFSET] &&	/* Protocol error in EMV mode */
+			((GEMPC433 == ccid_descriptor->readerID)
+			|| (CHERRYXX33 == ccid_descriptor->readerID)))
 		{
 			unsigned char cmd[] = "\x1F\x01";
 			unsigned char res[1];