[Pcsclite-cvs-commit] PCSC/src readerfactory.c,1.18,1.19

sauveron-guest@quantz.debian.org sauveron-guest@quantz.debian.org
Mon, 15 Sep 2003 15:55:49 +0200


Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv27032/src

Modified Files:
	readerfactory.c 
Log Message:
Add the support of simultaneous access on the thread safe IFD.

Index: readerfactory.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/readerfactory.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- readerfactory.c	11 Sep 2003 21:19:53 -0000	1.18
+++ readerfactory.c	15 Sep 2003 13:55:47 -0000	1.19
@@ -180,6 +180,17 @@
 		  (sContexts[parentNode])->vHandle;
 		(sContexts[dwContext])->mMutex = 
 		  (sContexts[parentNode])->mMutex;
+		
+		/*
+		 * Call on the driver to see if it is thread safe 
+		 */
+		rv = IFDGetCapabilities((sContexts[parentNode]),
+		       TAG_IFD_THREAD_SAFE, &dwGetSize, ucGetData);
+
+		if (rv == IFD_SUCCESS && dwGetSize == 1 && ucGetData[0] == 1)
+		{
+			(sContexts[dwContext])->mMutex = 0;
+		}
 	}
 
 	if ((sContexts[dwContext])->dwFeeds == 0)