[Pcsclite-cvs-commit] r4485 - /trunk/PCSC/src/winscard_clnt.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Oct 12 14:37:17 UTC 2009


Author: rousseau
Date: Mon Oct 12 14:37:16 2009
New Revision: 4485

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4485
Log:
SCardReleaseContext(), SCardConnect(), SCardReconnect(),
SCardDisconnect(), SCardBeginTransaction(), SCardEndTransaction(),
SCardCancelTransaction(), SCardStatus(), SCardGetStatusChange(),
SCardControl(), SCardGetSetAttrib(), SCardTransmit(),
SCardListReaders(), SCardFreeMemory()SCardListReaderGroups(),
SCardIsValidContext(): do not SCardCheckDaemonAvailability() since we
will try to talk to the server later. Any communication problem will be
reported by SHMMessageSendWithHeader()

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=4485&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Mon Oct 12 14:37:16 2009
@@ -542,19 +542,6 @@
 		return SCARD_E_INVALID_HANDLE;
 	}
 
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-	{
-		/*
-		 * Remove the local context from the stack
-		 */
-		(void)SCardLockThread();
-		(void)SCardRemoveContext(hContext);
-		(void)SCardUnlockThread();
-
-		return rv;
-	}
-
 	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the context is still opened */
@@ -711,10 +698,6 @@
 	 */
 	if (strlen(szReader) > MAX_READERNAME)
 		return SCARD_E_INVALID_VALUE;
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this context has been opened
@@ -866,10 +849,6 @@
 	if (pdwActiveProtocol == NULL)
 		return SCARD_E_INVALID_PARAMETER;
 
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
-
 	/*
 	 * Make sure this handle has been opened
 	 */
@@ -966,10 +945,6 @@
 	DWORD dwContextIndex, dwChannelIndex;
 
 	PROFILE_START
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this handle has been opened
@@ -1069,10 +1044,6 @@
 	DWORD dwContextIndex, dwChannelIndex;
 
 	PROFILE_START
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this handle has been opened
@@ -1190,10 +1161,6 @@
 	 */
 	randnum = 0;
 
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
-
 	/*
 	 * Make sure this handle has been opened
 	 */
@@ -1267,10 +1234,6 @@
 	DWORD dwContextIndex, dwChannelIndex;
 
 	PROFILE_START
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this handle has been opened
@@ -1447,10 +1410,6 @@
 
 	*pcchReaderLen = 0;
 	*pcbAtrLen = 0;
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this handle has been opened
@@ -1738,10 +1697,6 @@
 	else
 		/* reader list is empty */
 		return SCARD_S_SUCCESS;
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this context has been opened
@@ -2231,10 +2186,6 @@
 	/* 0 bytes received by default */
 	if (NULL != lpBytesReturned)
 		*lpBytesReturned = 0;
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this handle has been opened
@@ -2526,10 +2477,6 @@
 	struct getset_struct scGetSetStruct;
 	DWORD dwContextIndex, dwChannelIndex;
 
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
-
 	/*
 	 * Make sure this handle has been opened
 	 */
@@ -2683,10 +2630,6 @@
 			pcbRecvLength == NULL || pioSendPci == NULL)
 		return SCARD_E_INVALID_PARAMETER;
 
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
-
 	/*
 	 * Make sure this handle has been opened
 	 */
@@ -2862,10 +2805,6 @@
 	 */
 	if (pcchReaders == NULL)
 		return SCARD_E_INVALID_PARAMETER;
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this context has been opened
@@ -2979,10 +2918,6 @@
 
 	PROFILE_START
 
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
-
 	/*
 	 * Make sure this context has been opened
 	 */
@@ -3058,10 +2993,6 @@
 	/* Multi-string with two trailing \0 */
 	const char ReaderGroup[] = "SCard$DefaultReaders\0";
 	const int dwGroups = sizeof(ReaderGroup);
-
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
 
 	/*
 	 * Make sure this context has been opened
@@ -3237,11 +3168,6 @@
 
 	rv = SCARD_S_SUCCESS;
 
-	/* Check if the _same_ server is running */
-	rv = SCardCheckDaemonAvailability();
-	if (rv != SCARD_S_SUCCESS)
-		return rv;
-
 	/*
 	 * Make sure this context has been opened
 	 */




More information about the Pcsclite-cvs-commit mailing list