[Pcsclite-cvs-commit] r1726 - trunk/PCSC/src
Ludovic Rousseau
rousseau at costa.debian.org
Mon Nov 21 15:25:23 UTC 2005
Author: rousseau
Date: 2005-11-21 15:25:23 +0000 (Mon, 21 Nov 2005)
New Revision: 1726
Modified:
trunk/PCSC/src/hotplug_macosx.c
Log:
HPSearchHotPluggables(): fill a "usb:%04x/%04x" string as deviceName[]
so it is possible to differentiate two non-identical readers
Modified: trunk/PCSC/src/hotplug_macosx.c
===================================================================
--- trunk/PCSC/src/hotplug_macosx.c 2005-11-21 13:18:11 UTC (rev 1725)
+++ trunk/PCSC/src/hotplug_macosx.c 2005-11-21 15:25:23 UTC (rev 1726)
@@ -750,10 +750,19 @@
}
if (!found)
{
- /* NOTE: The deviceName is an empty string "" until someone
- * implements the code to get it */
+ char deviceName[MAX_DEVICENAME];
+
+ /* the format should be "usb:%04x/%04x:libusb:%s" but we do not
+ * know the libusb string. So it is not possible to differentiate
+ * two identical readers :-( */
+ snprintf(deviceName, sizeof(deviceName), "usb:%04x/%04x",
+ (unsigned int)a->m_driver->m_vendorId,
+ (unsigned int)a->m_driver->m_productId);
+ deviceName[sizeof(deviceName)-1] = '\0';
+
RFAddReader(a->m_driver->m_friendlyName,
- PCSCLITE_HP_BASE_PORT + a->m_address, a->m_driver->m_libPath, "");
+ PCSCLITE_HP_BASE_PORT + a->m_address, a->m_driver->m_libPath,
+ deviceName);
}
}
More information about the Pcsclite-cvs-commit
mailing list