[Pcsclite-cvs-commit] Drivers/ccid/src ifdhandler.c,1.50,1.51

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


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

Modified Files:
	ifdhandler.c 
Log Message:
IFDHSetProtocolParameters(): we shall indicate the T=1 checksum used
(LRC/CRC) in the SetParameters() command


Index: ifdhandler.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- ifdhandler.c	6 Aug 2004 11:32:01 -0000	1.50
+++ ifdhandler.c	24 Aug 2004 07:34:10 -0000	1.51
@@ -536,11 +536,17 @@
 			0x00	/* NADValue		*/
 		};
 		int i;
+		t1_state_t *t1 = &(ccid_slot -> t1);
 
 		/* TA1 is not default */
 		if (PPS_HAS_PPS1(pps))
 			param[0] = pps[2];
+ 
+		/* CRC checksum? */
+		if (2 == t1->rc_bytes)
+			param[1] &= 0x01;
 
+		/* the CCID should ignore this bit */
 		if (ATR_CONVENTION_INVERSE == convention)
 			param[1] &= 0x02;