[Pcsclite-cvs-commit] r2289 - trunk/Drivers/ccid/src
Ludovic Rousseau
rousseau at alioth.debian.org
Tue Jan 2 15:25:31 CET 2007
Author: rousseau
Date: 2007-01-02 15:25:30 +0100 (Tue, 02 Jan 2007)
New Revision: 2289
Modified:
trunk/Drivers/ccid/src/ccid_usb.c
Log:
WriteUSB()/ReadUSB(): call CloseUSB() as soon as the device disapears
(ENODEV) since the libusb structures pointed by usbDevice[] may be
reused by another USB device
Modified: trunk/Drivers/ccid/src/ccid_usb.c
===================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c 2006-12-30 20:33:45 UTC (rev 2288)
+++ trunk/Drivers/ccid/src/ccid_usb.c 2007-01-02 14:25:30 UTC (rev 2289)
@@ -478,7 +478,10 @@
DEBUG_CRITICAL2("usb_bulk_write(no device): %s", strerror(errno));
if (ENODEV == errno)
+ {
+ CloseUSB(reader_index);
return STATUS_NO_SUCH_DEVICE;
+ }
return STATUS_UNSUCCESSFUL;
}
@@ -519,7 +522,10 @@
DEBUG_CRITICAL2("usb_bulk_read(no device): %s", strerror(errno));
if (ENODEV == errno)
+ {
+ CloseUSB(reader_index);
return STATUS_NO_SUCH_DEVICE;
+ }
return STATUS_UNSUCCESSFUL;
}
More information about the Pcsclite-cvs-commit
mailing list