[Pcsclite-cvs-commit] r5572 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Feb 1 07:54:38 UTC 2011
Author: rousseau
Date: Tue Feb 1 07:54:36 2011
New Revision: 5572
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5572
Log:
SCardDisconnect(): remove the card handle only if SCARD_DISCONNECT
command succeeded on the server
Related to alioth bug [#312960] SCardDisconnect when other context has
transaction
If a first SCardDisconnect() fails with SCARD_E_SHARING_VIOLATION it is
now possible to try again SCardDisconnect(). Before the patch the
second call to SCardDisconnect() returned SCARD_E_INVALID_HANDLE but the
connection was still "in use".
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=5572&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Tue Feb 1 07:54:36 2011
@@ -1162,7 +1162,8 @@
if (rv != SCARD_S_SUCCESS)
goto end;
- (void)SCardRemoveHandle(hCard);
+ if (SCARD_S_SUCCESS == scDisconnectStruct.rv)
+ (void)SCardRemoveHandle(hCard);
rv = scDisconnectStruct.rv;
end:
More information about the Pcsclite-cvs-commit
mailing list