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

Ludovic Rousseau rousseau at costa.debian.org
Mon Sep 5 13:17:10 UTC 2005


Author: rousseau
Date: 2005-09-05 13:17:09 +0000 (Mon, 05 Sep 2005)
New Revision: 1639

Modified:
   trunk/Drivers/ccid/src/parse.c
Log:
do not request data rates if the reader reports it support a 0 length
list. Idem for clocks.


Modified: trunk/Drivers/ccid/src/parse.c
===================================================================
--- trunk/Drivers/ccid/src/parse.c	2005-09-05 13:15:14 UTC (rev 1638)
+++ trunk/Drivers/ccid/src/parse.c	2005-09-05 13:17:09 UTC (rev 1639)
@@ -206,6 +206,7 @@
 	printf("  dwDefaultClock: %.3f MHz\n", dw2i(extra, 10)/1000.0);
 	printf("  dwMaximumClock: %.3f MHz\n", dw2i(extra, 14)/1000.0);
 	printf("  bNumClockSupported: %d\n", extra[18]);
+	if (extra[18])
 	{
 		unsigned char buffer[256*sizeof(int)];  /* maximum is 256 records */
 		int n;
@@ -248,6 +249,7 @@
 	printf("  dwDataRate: %d bps\n", dw2i(extra, 19));
 	printf("  dwMaxDataRate: %d bps\n", dw2i(extra, 23));
 	printf("  bNumDataRatesSupported: %d\n", extra[27]);
+	if (extra[27])
 	{
 		unsigned char buffer[256*sizeof(int)];  /* maximum is 256 records */
 		int n;




More information about the Pcsclite-cvs-commit mailing list