[Pcsclite-cvs-commit] PCSC/src hotplug_linux.c,1.24,1.25

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv3734/src

Modified Files:
	hotplug_linux.c 
Log Message:
add support for HPStopHotPluggables()


Index: hotplug_linux.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_linux.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- hotplug_linux.c	4 Feb 2004 21:48:00 -0000	1.24
+++ hotplug_linux.c	20 Mar 2004 17:53:22 -0000	1.25
@@ -35,6 +35,9 @@
 
 #define PCSCLITE_USB_PATH		"/proc/bus/usb"
 
+#define FALSE			0
+#define TRUE			1
+
 extern PCSCLITE_MUTEX usbNotifierMutex;
 
 struct usb_device_descriptor
@@ -61,6 +64,7 @@
 LONG HPReadBundleValues();
 
 static PCSCLITE_THREAD_T usbNotifyThread;
+static int AraKiriHotPlug = FALSE;
 static int bundleSize = 0;
 
 /*
@@ -341,6 +345,13 @@
 		}	/* End of for..loop */
 
 		SYS_Sleep(1);
+		if (AraKiriHotPlug)
+		{
+			int retval;
+
+			DebugLogA("Hotplug stopped");
+			pthread_exit(&retval);
+		}
 
 	}	/* End of while loop */
 }
@@ -362,6 +373,13 @@
 
 	SYS_ThreadCreate(&usbNotifyThread, NULL,
 		(LPVOID) HPEstablishUSBNotifications, 0);
+
+	return 0;
+}
+
+LONG HPStopHotPluggables(void)
+{
+	AraKiriHotPlug = TRUE;
 
 	return 0;
 }