[Pcsclite-cvs-commit] r1806 - trunk/Drivers/ccid/src

Ludovic Rousseau rousseau at costa.debian.org
Wed Jan 18 09:24:16 UTC 2006


Author: rousseau
Date: 2006-01-18 09:24:15 +0000 (Wed, 18 Jan 2006)
New Revision: 1806

Modified:
   trunk/Drivers/ccid/src/ifdhandler.c
Log:
IFDHSetProtocolParameters(): exit the while if you find a correct speed
in the case of a card too fast


Modified: trunk/Drivers/ccid/src/ifdhandler.c
===================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c	2006-01-18 07:38:06 UTC (rev 1805)
+++ trunk/Drivers/ccid/src/ifdhandler.c	2006-01-18 09:24:15 UTC (rev 1806)
@@ -513,7 +513,7 @@
 			else
 			{
 				/* the card is too fast for the reader */
-				if ((card_baudrate >= ccid_desc->dwMaxDataRate)
+				if ((card_baudrate > ccid_desc->dwMaxDataRate +2)
 					/* but TA1 <= 97 */
 					&& (atr.ib[0][ATR_INTERFACE_BYTE_TA].value <= 0x97)
 					/* and the reader has a baud rate table */
@@ -542,6 +542,8 @@
 
 							DEBUG_COMM2("Set adapted speed to %d bauds",
 								card_baudrate);
+
+							break;
 						}
 					}
 




More information about the Pcsclite-cvs-commit mailing list