Commit c2d79706 authored by Ludovic Rousseau's avatar Ludovic Rousseau

MSGRemoveContext(): disconnect also if no lock is ongoing

If SCardDisconnect() is not called by the application it should be
called by pcscd to enable card auto power off.

This fixes a regression added by 57092b35.
parent dde4deb7
......@@ -885,7 +885,7 @@ static LONG MSGRemoveContext(SCARDCONTEXT hContext, SCONTEXT * threadContext)
return rv;
}
if (hCard != rContext->hLockId)
if ((rContext->hLockId != 0) && (hCard != rContext->hLockId))
{
/*
* if the card is locked by someone else we do not reset it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment