[Pcsclite-cvs-commit] r4297 - in /trunk/PCSC/src: hotplug_libhal.c readerfactory.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Jul 3 12:55:48 UTC 2009


Author: rousseau
Date: Fri Jul  3 12:55:47 2009
New Revision: 4297

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4297
Log:
do not try to open a device using the libusb scheme if opening it with
the libhal scheme returns IFD_NO_SUCH_DEVICE

The device may be composite and the interface found is not CCID (HID for
example). Just skip this interface and try the next one.

Modified:
    trunk/PCSC/src/hotplug_libhal.c
    trunk/PCSC/src/readerfactory.c

Modified: trunk/PCSC/src/hotplug_libhal.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libhal.c?rev=4297&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libhal.c (original)
+++ trunk/PCSC/src/hotplug_libhal.c Fri Jul  3 12:55:47 2009
@@ -426,7 +426,7 @@
 
 	ret = RFAddReader(readerTracker[i].fullName, PCSCLITE_HP_BASE_PORT + i,
 		driver->libraryPath, deviceName);
-	if (SCARD_S_SUCCESS != ret)
+	if ((SCARD_S_SUCCESS != ret) && (SCARD_E_UNKNOWN_READER != ret))
 	{
 		char *parent, *device_file;
 

Modified: trunk/PCSC/src/readerfactory.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/readerfactory.c?rev=4297&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.c (original)
+++ trunk/PCSC/src/readerfactory.c Fri Jul  3 12:55:47 2009
@@ -1050,7 +1050,10 @@
 			rContext->dwPort, rContext->lpcDevice);
 		(void)RFUnBindFunctions(rContext);
 		(void)RFUnloadReader(rContext);
-		return SCARD_E_INVALID_TARGET;
+		if (IFD_NO_SUCH_DEVICE == rv)
+			return SCARD_E_UNKNOWN_READER;
+		else
+			return SCARD_E_INVALID_TARGET;
 	}
 
 	return SCARD_S_SUCCESS;




More information about the Pcsclite-cvs-commit mailing list