[Pcsclite-cvs-commit] r4812 - in /trunk/PCSC/UnitaryTests: ThreadSafe.py ThreadSafeConnect.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Mar 12 09:56:29 UTC 2010
Author: rousseau
Date: Fri Mar 12 09:56:28 2010
New Revision: 4812
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4812
Log:
do not initialise the library in a thread as it crashed on Mac OS X
Modified:
trunk/PCSC/UnitaryTests/ThreadSafe.py
trunk/PCSC/UnitaryTests/ThreadSafeConnect.py
Modified: trunk/PCSC/UnitaryTests/ThreadSafe.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/ThreadSafe.py?rev=4812&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/ThreadSafe.py (original)
+++ trunk/PCSC/UnitaryTests/ThreadSafe.py Fri Mar 12 09:56:28 2010
@@ -48,6 +48,13 @@
"""
main
"""
+
+ hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
+ if hresult != SCARD_S_SUCCESS:
+ raise Exception('Failed to establish context: '
+ + SCardGetErrorMessage(hresult))
+ hresult = SCardReleaseContext(hcontext+1)
+
threads = list()
for i in range(1, MAX_THREADS):
Modified: trunk/PCSC/UnitaryTests/ThreadSafeConnect.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/ThreadSafeConnect.py?rev=4812&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/ThreadSafeConnect.py (original)
+++ trunk/PCSC/UnitaryTests/ThreadSafeConnect.py Fri Mar 12 09:56:28 2010
@@ -77,6 +77,12 @@
"""
main
"""
+ hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
+ if hresult != SCARD_S_SUCCESS:
+ raise Exception('Failed to establish context: '
+ + SCardGetErrorMessage(hresult))
+ hresult = SCardReleaseContext(hcontext+1)
+
threads = list()
for i in range(0, MAX_THREADS):
More information about the Pcsclite-cvs-commit
mailing list