[Pcsclite-cvs-commit] r5341 - in /trunk/PCSC/src: PCSC/winscard.h winscard.c winscard_clnt.c winscard_msg.h winscard_svc.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Oct 22 11:36:10 UTC 2010
Author: rousseau
Date: Fri Oct 22 11:36:06 2010
New Revision: 5341
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5341
Log:
SCardCancelTransaction() is no more provided.
This function is not provided by Microsoft and is deprecated since 2005
in pcsc-lite.
Modified:
trunk/PCSC/src/PCSC/winscard.h
trunk/PCSC/src/winscard.c
trunk/PCSC/src/winscard_clnt.c
trunk/PCSC/src/winscard_msg.h
trunk/PCSC/src/winscard_svc.c
Modified: trunk/PCSC/src/PCSC/winscard.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/PCSC/winscard.h?rev=5341&op=diff
==============================================================================
--- trunk/PCSC/src/PCSC/winscard.h (original)
+++ trunk/PCSC/src/PCSC/winscard.h Fri Oct 22 11:36:06 2010
@@ -53,8 +53,6 @@
PCSC_API LONG SCardEndTransaction(SCARDHANDLE hCard, DWORD dwDisposition);
- PCSC_API LONG SCardCancelTransaction(SCARDHANDLE hCard);
-
PCSC_API LONG SCardStatus(SCARDHANDLE hCard,
/*@null@*/ /*@out@*/ LPSTR mszReaderName,
/*@null@*/ /*@out@*/ LPDWORD pcchReaderLen,
Modified: trunk/PCSC/src/winscard.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard.c?rev=5341&op=diff
==============================================================================
--- trunk/PCSC/src/winscard.c (original)
+++ trunk/PCSC/src/winscard.c Fri Oct 22 11:36:06 2010
@@ -1172,40 +1172,6 @@
return rv;
}
-LONG SCardCancelTransaction(SCARDHANDLE hCard)
-{
- LONG rv;
- READER_CONTEXT * rContext = NULL;
-
- /*
- * Ignoring dwDisposition for now
- */
- if (hCard == 0)
- return SCARD_E_INVALID_HANDLE;
-
- /* get rContext corresponding to hCard */
- rv = RFReaderInfoById(hCard, &rContext);
- if (rv != SCARD_S_SUCCESS)
- return rv;
-
- rv = RFFindReaderHandle(hCard);
- if (rv != SCARD_S_SUCCESS)
- return rv;
-
- /*
- * Make sure some event has not occurred
- */
- rv = RFCheckReaderEventState(rContext, hCard);
- if (rv != SCARD_S_SUCCESS)
- return rv;
-
- rv = RFUnlockSharing(hCard, rContext);
-
- Log2(PCSC_LOG_DEBUG, "Status: 0x%08X", rv);
-
- return rv;
-}
-
LONG SCardStatus(SCARDHANDLE hCard, LPSTR mszReaderNames,
LPDWORD pcchReaderLen, LPDWORD pdwState,
LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen)
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=5341&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Fri Oct 22 11:36:06 2010
@@ -1365,75 +1365,6 @@
(void)pthread_mutex_unlock(currentContextMap->mMutex);
PROFILE_END(rv)
-
- return rv;
-}
-
-/**
- * @deprecated
- * This function is not in Microsoft(R) WinSCard API and is deprecated
- * in pcsc-lite API.
- * @ingroup API
- */
-LONG SCardCancelTransaction(SCARDHANDLE hCard)
-{
- LONG rv;
- struct cancel_transaction_struct scCancelStruct;
- SCONTEXTMAP * currentContextMap;
- CHANNEL_MAP * pChannelMap;
-
- PROFILE_START
-
- CHECK_SAME_PROCESS
-
- /*
- * Make sure this handle has been opened
- */
- rv = SCardGetContextAndChannelFromHandle(hCard, ¤tContextMap,
- &pChannelMap);
- if (rv == -1)
- return SCARD_E_INVALID_HANDLE;
-
- (void)pthread_mutex_lock(currentContextMap->mMutex);
-
- /* check the handle is still valid */
- rv = SCardGetContextAndChannelFromHandle(hCard, ¤tContextMap,
- &pChannelMap);
- if (rv == -1)
- /* the handle is now invalid
- * -> another thread may have called SCardReleaseContext
- * -> so the mMutex has been unlocked */
- return SCARD_E_INVALID_HANDLE;
-
- scCancelStruct.hCard = hCard;
-
- rv = MessageSendWithHeader(SCARD_CANCEL_TRANSACTION,
- currentContextMap->dwClientID,
- sizeof(scCancelStruct), (void *) &scCancelStruct);
-
- if (rv == -1)
- {
- rv = SCARD_E_NO_SERVICE;
- goto end;
- }
-
- /*
- * Read a message from the server
- */
- rv = MessageReceive(&scCancelStruct, sizeof(scCancelStruct),
- currentContextMap->dwClientID);
-
- if (rv < 0)
- {
- rv = SCARD_F_COMM_ERROR;
- goto end;
- }
- rv = scCancelStruct.rv;
-
-end:
- (void)pthread_mutex_unlock(currentContextMap->mMutex);
-
- PROFILE_END(rv)
return rv;
}
Modified: trunk/PCSC/src/winscard_msg.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_msg.h?rev=5341&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_msg.h (original)
+++ trunk/PCSC/src/winscard_msg.h Fri Oct 22 11:36:06 2010
@@ -68,9 +68,9 @@
SCARD_TRANSMIT = 0x09, /**< used by SCardTransmit() */
SCARD_CONTROL = 0x0A, /**< used by SCardControl() */
SCARD_STATUS = 0x0B, /**< used by SCardStatus() */
- SCARD_GET_STATUS_CHANGE = 0x0C, /**< not use */
+ SCARD_GET_STATUS_CHANGE = 0x0C, /**< not used */
SCARD_CANCEL = 0x0D, /**< used by SCardCancel() */
- SCARD_CANCEL_TRANSACTION = 0x0E, /**< used by SCardCancelTransaction() */
+ SCARD_CANCEL_TRANSACTION = 0x0E,/**< not used */
SCARD_GET_ATTRIB = 0x0F, /**< used by SCardGetAttrib() */
SCARD_SET_ATTRIB = 0x10, /**< used by SCardSetAttrib() */
CMD_VERSION = 0x11, /**< get the client/server protocol version */
@@ -191,17 +191,6 @@
struct cancel_struct
{
int32_t hContext;
- uint32_t rv;
- };
-
- /**
- * @brief contained in \ref SCARD_CANCEL_TRANSACTION Messages.
- *
- * These data are passed throw the field \c sharedSegmentMsg.data.
- */
- struct cancel_transaction_struct
- {
- int32_t hCard;
uint32_t rv;
};
Modified: trunk/PCSC/src/winscard_svc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_svc.c?rev=5341&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_svc.c (original)
+++ trunk/PCSC/src/winscard_svc.c Fri Oct 22 11:36:06 2010
@@ -507,21 +507,6 @@
}
break;
- case SCARD_CANCEL_TRANSACTION:
- {
- struct cancel_transaction_struct caStr;
-
- READ_BODY(caStr)
-
- if (MSGCheckHandleAssociation(caStr.hCard, threadContext))
- goto exit;
-
- caStr.rv = SCardCancelTransaction(caStr.hCard);
-
- WRITE_BODY(caStr)
- }
- break;
-
case SCARD_CANCEL:
{
struct cancel_struct caStr;
More information about the Pcsclite-cvs-commit
mailing list