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

Ludovic Rousseau rousseau at costa.debian.org
Tue Jan 17 13:41:27 UTC 2006


Author: rousseau
Date: 2006-01-17 13:41:26 +0000 (Tue, 17 Jan 2006)
New Revision: 1801

Modified:
   trunk/Drivers/ccid/src/ccid_serial.c
Log:
OpenSerialByName(): call CloseSerial() if the "Get firmware" or "Change
card movement notification" command failed


Modified: trunk/Drivers/ccid/src/ccid_serial.c
===================================================================
--- trunk/Drivers/ccid/src/ccid_serial.c	2006-01-16 13:45:50 UTC (rev 1800)
+++ trunk/Drivers/ccid/src/ccid_serial.c	2006-01-17 13:41:26 UTC (rev 1801)
@@ -640,6 +640,7 @@
 			rx_buffer, &rx_length))
 		{
 			DEBUG_CRITICAL("Get firmware failed. Maybe the reader is not connected");
+			CloseSerial(reader_index);
 			return STATUS_UNSUCCESSFUL;
 		}
 
@@ -662,6 +663,7 @@
 			rx_buffer, &rx_length))
 		{
 			DEBUG_CRITICAL("Change card movement notification failed.");
+			CloseSerial(reader_index);
 			return STATUS_UNSUCCESSFUL;
 		}
 	}




More information about the Pcsclite-cvs-commit mailing list