[Pcsclite-cvs-commit] Drivers/ccid/src ccid.c,1.11,1.12

rousseau@haydn.debian.org rousseau@haydn.debian.org


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

Modified Files:
	ccid.c 
Log Message:
ccid_open_hack(): update the hack for the SCR331-DI contactless now we
use multi-slots


Index: ccid.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ccid.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ccid.c	28 Jul 2004 08:33:17 -0000	1.11
+++ ccid.c	6 Aug 2004 11:56:07 -0000	1.12
@@ -73,7 +73,7 @@
 		/* SCM SCR331-DI contactless */
 		case SCR331DI:
 			/* the contactless reader is in the second slot */
-			if (ccid_descriptor->bMaxSlotIndex > 0)
+			if (ccid_descriptor->bCurrentSlotIndex > 0)
 			{
 				unsigned char cmd1[] = { 0x00 };
 				/*  command: 00 ??
@@ -93,10 +93,13 @@
 				else
 				{
 					DEBUG_COMM("SCM SCR331-DI contactless init failed");
-
-					/* inhibit the contactless reader */
-					ccid_descriptor->bMaxSlotIndex = 0;
 				}
+
+				/* hack since the contactless reader do not share dwFeatures */
+				ccid_descriptor->dwFeatures &= ~CCID_CLASS_EXCHANGE_MASK;
+				ccid_descriptor->dwFeatures |= CCID_CLASS_SHORT_APDU;
+
+				ccid_descriptor->dwFeatures |= CCID_CLASS_AUTO_IFSD;
 			}
 			break;
 	}