[Pcsclite-cvs-commit] r2845 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Mar 4 10:51:19 UTC 2008
Author: rousseau
Date: Tue Mar 4 10:51:18 2008
New Revision: 2845
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2845
Log:
SCardReleaseContext(): remove the local context at the end like before
revision 2833 (since we use the psContextMap[dwContextIndex].mMutex) or
if SCardCheckDaemonAvailability() fails
Modified:
trunk/PCSC/src/winscard_clnt.c
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=2845&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Tue Mar 4 10:51:18 2008
@@ -576,17 +576,17 @@
if (dwContextIndex == -1)
return SCARD_E_INVALID_HANDLE;
- /*
- * Remove the local context from the stack
- */
- SCardLockThread();
- rv = SCardRemoveContext(hContext);
- SCardUnlockThread();
- if (rv != SCARD_S_SUCCESS)
- return rv;
-
if (SCardCheckDaemonAvailability() != SCARD_S_SUCCESS)
+ {
+ /*
+ * Remove the local context from the stack
+ */
+ SCardLockThread();
+ SCardRemoveContext(hContext);
+ SCardUnlockThread();
+
return SCARD_E_NO_SERVICE;
+ }
SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
@@ -618,6 +618,13 @@
}
SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+
+ /*
+ * Remove the local context from the stack
+ */
+ SCardLockThread();
+ SCardRemoveContext(hContext);
+ SCardUnlockThread();
PROFILE_END(scReleaseStruct.rv)
More information about the Pcsclite-cvs-commit
mailing list