[Pcsclite-cvs-commit] r3097 - /trunk/Drivers/ccid/src/ccid_usb.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Aug 19 13:55:29 UTC 2008


Author: rousseau
Date: Tue Aug 19 13:55:28 2008
New Revision: 3097

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3097
Log:
InterruptRead(): do not cache if the reader has failed previously since
this state was stored in a static variable global to all the readers
managed by the driver and was not per reader.

Without this mechanism we may have a bit more error messages logged but
the driver will work in a multi-reader configuration.

Modified:
    trunk/Drivers/ccid/src/ccid_usb.c

Modified: trunk/Drivers/ccid/src/ccid_usb.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ccid_usb.c?rev=3097&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c (original)
+++ trunk/Drivers/ccid/src/ccid_usb.c Tue Aug 19 13:55:28 2008
@@ -859,21 +859,11 @@
 	int ret;
 	char buffer[8];
 	int timeout = 2*1000; /* 2 seconds */
-	static int hasfailed = FALSE;
-
-	if (hasfailed)
-	{
-		DEBUG_COMM("driver has failed");
-		return 0;
-	}
 
 	DEBUG_COMM("before");
 	ret = usb_interrupt_read(usbDevice[reader_index].handle,
 		usbDevice[reader_index].interrupt, buffer, sizeof(buffer), timeout);
 	DEBUG_COMM2("after %d", ret);
-
-	if (0 == ret)
-		hasfailed = TRUE;
 
 	if (ret < 0)
 	{




More information about the Pcsclite-cvs-commit mailing list