[Pcsclite-cvs-commit] r2182 - trunk/PCSC/src
Ludovic Rousseau
rousseau at costa.debian.org
Wed Oct 11 09:28:02 UTC 2006
Author: rousseau
Date: 2006-10-11 09:28:01 +0000 (Wed, 11 Oct 2006)
New Revision: 2182
Modified:
trunk/PCSC/src/readerfactory.c
Log:
RFUnlockSharing(): small rewrite
Modified: trunk/PCSC/src/readerfactory.c
===================================================================
--- trunk/PCSC/src/readerfactory.c 2006-10-05 14:53:48 UTC (rev 2181)
+++ trunk/PCSC/src/readerfactory.c 2006-10-11 09:28:01 UTC (rev 2182)
@@ -1052,17 +1052,19 @@
LONG RFUnlockSharing(DWORD hCard)
{
PREADER_CONTEXT rContext = NULL;
+ LONG rv;
- RFReaderInfoById(hCard, &rContext);
+ rv = RFReaderInfoById(hCard, &rContext);
+ if (rv != SCARD_S_SUCCESS)
+ return rv;
- if (RFCheckSharing(hCard) == SCARD_S_SUCCESS)
- {
- EHSetSharingEvent(rContext, 0);
- rContext->dwLockId = 0;
- }
- else
- return SCARD_E_SHARING_VIOLATION;
+ rv = RFCheckSharing(hCard);
+ if (rv != SCARD_S_SUCCESS)
+ return rv;
+ EHSetSharingEvent(rContext, 0);
+ rContext->dwLockId = 0;
+
return SCARD_S_SUCCESS;
}
More information about the Pcsclite-cvs-commit
mailing list