[Pcsclite-cvs-commit] r3042 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Jul 4 08:58:12 UTC 2008
Author: rousseau
Date: Fri Jul 4 08:58:12 2008
New Revision: 3042
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3042
Log:
SCardGetStatusChange(): move and simplify the check the integrity of the
reader states structures routine
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=3042&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Fri Jul 4 08:58:12 2008
@@ -1746,6 +1746,13 @@
|| (cReaders > PCSCLITE_MAX_READERS_CONTEXTS))
return SCARD_E_INVALID_PARAMETER;
+ /* Check the integrity of the reader states structures */
+ for (j = 0; j < cReaders; j++)
+ {
+ if (rgReaderStates[j].szReader == NULL)
+ return SCARD_E_INVALID_VALUE;
+ }
+
/* return if all readers are SCARD_STATE_IGNORE */
if (cReaders > 0)
{
@@ -1838,21 +1845,6 @@
return SCARD_E_TIMEOUT;
}
}
- }
- }
-
- /*
- * Check the integrity of the reader states structures
- */
-
- for (j = 0; j < cReaders; j++)
- {
- currReader = &rgReaderStates[j];
-
- if (currReader->szReader == NULL)
- {
- SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
- return SCARD_E_INVALID_VALUE;
}
}
More information about the Pcsclite-cvs-commit
mailing list