[Pcsclite-cvs-commit] r2232 - trunk/PCSC/src

Ludovic Rousseau rousseau at alioth.debian.org
Tue Nov 21 15:59:44 CET 2006


Author: rousseau
Date: 2006-11-21 15:59:44 +0100 (Tue, 21 Nov 2006)
New Revision: 2232

Modified:
   trunk/PCSC/src/hotplug_libusb.c
Log:
remove the driver field from struct readerTracker
use the fullName field to check if the reader entry is valid or not


Modified: trunk/PCSC/src/hotplug_libusb.c
===================================================================
--- trunk/PCSC/src/hotplug_libusb.c	2006-11-21 14:56:32 UTC (rev 2231)
+++ trunk/PCSC/src/hotplug_libusb.c	2006-11-21 14:59:44 UTC (rev 2232)
@@ -78,8 +78,6 @@
 	char status;
 	char bus_device[BUS_DEVICE_STRSIZE];	/* device name */
 	char *fullName;	/* full reader name (including serial number) */
-
-	struct _driverTracker *driver;	/* driver for this reader */
 } readerTracker[PCSCLITE_MAX_READERS_CONTEXTS];
 
 LONG HPReadBundleValues(void);
@@ -335,8 +333,8 @@
 			close(fd);
 		}
 #endif
-		if (readerTracker[i].status == READER_ABSENT &&
-				readerTracker[i].driver != NULL)
+		if ((readerTracker[i].status == READER_ABSENT) &&
+			(readerTracker[i].fullName != NULL))
 			HPRemoveHotPluggable(i);
 	}
 
@@ -384,9 +382,9 @@
 
 	for (i=0; i<PCSCLITE_MAX_READERS_CONTEXTS; i++)
 	{
-		readerTracker[i].driver = NULL;
 		readerTracker[i].status = READER_ABSENT;
 		readerTracker[i].bus_device[0] = '\0';
+		readerTracker[i].fullName = NULL;
 	}
 
 	if (HPReadBundleValues())
@@ -420,7 +418,7 @@
 	/* find a free entry */
 	for (i=0; i<PCSCLITE_MAX_READERS_CONTEXTS; i++)
 	{
-		if (readerTracker[i].driver == NULL)
+		if (readerTracker[i].fullName == NULL)
 			break;
 	}
 
@@ -435,8 +433,6 @@
 		sizeof(readerTracker[i].bus_device));
 	readerTracker[i].bus_device[sizeof(readerTracker[i].bus_device) - 1] = '\0';
 
-	readerTracker[i].driver = driver;
-
 #ifdef ADD_SERIAL_NUMBER
 	if (dev->descriptor.iSerialNumber)
 	{
@@ -480,7 +476,7 @@
 	free(readerTracker[index].fullName);
 	readerTracker[index].status = READER_ABSENT;
 	readerTracker[index].bus_device[0] = '\0';
-	readerTracker[index].driver = NULL;
+	readerTracker[index].fullName = NULL;
 
 	SYS_MutexUnLock(&usbNotifierMutex);
 




More information about the Pcsclite-cvs-commit mailing list