[Pcsclite-cvs-commit] r4738 - in /trunk/PCSC/src: ifdwrapper.c readerfactory.c readerfactory.h winscard.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Feb 9 14:44:31 UTC 2010
Author: rousseau
Date: Tue Feb 9 14:44:30 2010
New Revision: 4738
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4738
Log:
In struct ReaderContext rename dwVersion to version and change type from
DWORD to int
Modified:
trunk/PCSC/src/ifdwrapper.c
trunk/PCSC/src/readerfactory.c
trunk/PCSC/src/readerfactory.h
trunk/PCSC/src/winscard.c
Modified: trunk/PCSC/src/ifdwrapper.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/ifdwrapper.c?rev=4738&op=diff
==============================================================================
--- trunk/PCSC/src/ifdwrapper.c (original)
+++ trunk/PCSC/src/ifdwrapper.c Tue Feb 9 14:44:30 2010
@@ -46,7 +46,7 @@
RESPONSECODE(*IFDH_set_protocol_parameters) (DWORD, DWORD, UCHAR,
UCHAR, UCHAR, UCHAR) = NULL;
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
IFD_set_protocol_parameters = (RESPONSECODE(*)(DWORD, UCHAR, UCHAR,
UCHAR, UCHAR)) rContext->psFunctions.psFunctions_v1.pvfSetProtocolParameters;
@@ -75,7 +75,7 @@
ucValue[0] = rContext->dwSlot;
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
ucValue[0] = rContext->dwSlot;
(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
@@ -116,11 +116,11 @@
RESPONSECODE(*IFDH_create_channel) (DWORD, DWORD) = NULL;
RESPONSECODE(*IFDH_create_channel_by_name) (DWORD, LPSTR) = NULL;
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
IO_create_channel =
rContext->psFunctions.psFunctions_v1.pvfCreateChannel;
else
- if (rContext->dwVersion == IFD_HVERSION_2_0)
+ if (rContext->version == IFD_HVERSION_2_0)
IFDH_create_channel =
rContext->psFunctions.psFunctions_v2.pvfCreateChannel;
else
@@ -136,10 +136,10 @@
(void)SYS_MutexLock(rContext->mMutex);
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
rv = (*IO_create_channel) (rContext->port);
- } else if (rContext->dwVersion == IFD_HVERSION_2_0)
+ } else if (rContext->version == IFD_HVERSION_2_0)
{
rv = (*IFDH_create_channel) (rContext->dwSlot, rContext->port);
} else
@@ -184,7 +184,7 @@
RESPONSECODE(*IO_close_channel) (void) = NULL;
RESPONSECODE(*IFDH_close_channel) (DWORD) = NULL;
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
IO_close_channel = rContext->psFunctions.psFunctions_v1.pvfCloseChannel;
else
IFDH_close_channel = rContext->psFunctions.psFunctions_v2.pvfCloseChannel;
@@ -206,7 +206,7 @@
}
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
rv = (*IO_close_channel) ();
else
@@ -237,7 +237,7 @@
RESPONSECODE(*IFD_set_capabilities) (DWORD, PUCHAR) = NULL;
RESPONSECODE(*IFDH_set_capabilities) (DWORD, DWORD, DWORD, PUCHAR) = NULL;
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
IFD_set_capabilities = rContext->psFunctions.psFunctions_v1.pvfSetCapabilities;
else
IFDH_set_capabilities = rContext->psFunctions.psFunctions_v2.pvfSetCapabilities;
@@ -249,7 +249,7 @@
*/
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
rv = (*IFD_set_capabilities) (dwTag, pucValue);
else
rv = (*IFDH_set_capabilities) (rContext->dwSlot, dwTag,
@@ -279,7 +279,7 @@
RESPONSECODE(*IFD_get_capabilities) (DWORD, /*@out@*/ PUCHAR) = NULL;
RESPONSECODE(*IFDH_get_capabilities) (DWORD, DWORD, PDWORD, /*@out@*/ PUCHAR) = NULL;
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
IFD_get_capabilities =
rContext->psFunctions.psFunctions_v1.pvfGetCapabilities;
else
@@ -291,7 +291,7 @@
(void)SYS_MutexLock(rContext->mMutex);
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
rv = (*IFD_get_capabilities) (dwTag, pucValue);
else
rv = (*IFDH_get_capabilities) (rContext->dwSlot, dwTag,
@@ -344,7 +344,7 @@
if (dwStatus & SCARD_ABSENT)
return SCARD_W_REMOVED_CARD;
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
IFD_power_icc = rContext->psFunctions.psFunctions_v1.pvfPowerICC;
else
IFDH_power_icc = rContext->psFunctions.psFunctions_v2.pvfPowerICC;
@@ -354,7 +354,7 @@
(void)SYS_MutexLock(rContext->mMutex);
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
ucValue[0] = rContext->dwSlot;
(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
@@ -400,7 +400,7 @@
/*
* Get the ATR and it's length
*/
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
(void)IFDStatusICC(rContext, &dwStatus, pucAtr, pdwAtrLen);
return rv;
@@ -423,7 +423,7 @@
RESPONSECODE(*IFDH_icc_presence) (DWORD) = NULL;
RESPONSECODE(*IFD_get_capabilities) (DWORD, /*@out@*/ PUCHAR) = NULL;
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
IFD_is_icc_present =
rContext->psFunctions.psFunctions_v1.pvfICCPresence;
@@ -438,7 +438,7 @@
(void)SYS_MutexLock(rContext->mMutex);
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
ucValue[0] = rContext->dwSlot;
(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
@@ -486,7 +486,7 @@
* to conserve resources
*/
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
if (rv == IFD_SUCCESS || rv == IFD_ICC_PRESENT)
{
@@ -563,7 +563,7 @@
PDWORD);
#endif
- if (rContext->dwVersion != IFD_HVERSION_2_0)
+ if (rContext->version != IFD_HVERSION_2_0)
return SCARD_E_UNSUPPORTED_FEATURE;
#ifndef PCSCLITE_STATIC_DRIVER
@@ -614,7 +614,7 @@
RESPONSECODE(*IFDH_control) (DWORD, DWORD, LPCVOID, DWORD, LPVOID, DWORD, LPDWORD);
#endif
- if (rContext->dwVersion < IFD_HVERSION_3_0)
+ if (rContext->version < IFD_HVERSION_3_0)
return SCARD_E_UNSUPPORTED_FEATURE;
#ifndef PCSCLITE_STATIC_DRIVER
@@ -681,7 +681,7 @@
DebugLogCategory(DEBUG_CATEGORY_APDU, pucTxBuffer, dwTxLength);
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
IFD_transmit_to_icc =
rContext->psFunctions.psFunctions_v1.pvfTransmitToICC;
else
@@ -693,7 +693,7 @@
(void)SYS_MutexLock(rContext->mMutex);
#ifndef PCSCLITE_STATIC_DRIVER
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
UCHAR ucValue[1];
Modified: trunk/PCSC/src/readerfactory.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/readerfactory.c?rev=4738&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.c (original)
+++ trunk/PCSC/src/readerfactory.c Tue Feb 9 14:44:30 2010
@@ -170,7 +170,7 @@
sReadersContexts[dwContext]->lpcLibrary = strdup(lpcLibrary);
(void)strlcpy((sReadersContexts[dwContext])->lpcDevice, lpcDevice,
sizeof((sReadersContexts[dwContext])->lpcDevice));
- (sReadersContexts[dwContext])->dwVersion = 0;
+ (sReadersContexts[dwContext])->version = 0;
(sReadersContexts[dwContext])->port = port;
(sReadersContexts[dwContext])->mMutex = NULL;
(sReadersContexts[dwContext])->dwBlockStatus = 0;
@@ -342,8 +342,8 @@
sReadersContexts[dwContext]->lpcLibrary;
(void)strlcpy((sReadersContexts[dwContextB])->lpcDevice, lpcDevice,
sizeof((sReadersContexts[dwContextB])->lpcDevice));
- (sReadersContexts[dwContextB])->dwVersion =
- (sReadersContexts[dwContext])->dwVersion;
+ (sReadersContexts[dwContextB])->version =
+ (sReadersContexts[dwContext])->version;
(sReadersContexts[dwContextB])->port =
(sReadersContexts[dwContext])->port;
(sReadersContexts[dwContextB])->vHandle =
@@ -495,7 +495,7 @@
}
sContext->lpcDevice[0] = 0;
- sContext->dwVersion = 0;
+ sContext->version = 0;
sContext->port = 0;
sContext->mMutex = NULL;
sContext->dwBlockStatus = 0;
@@ -750,20 +750,20 @@
} else if (rv1 == SCARD_S_SUCCESS)
{
/* Ifd Handler 1.0 found */
- rContext->dwVersion = IFD_HVERSION_1_0;
+ rContext->version = IFD_HVERSION_1_0;
} else if (rv3 == SCARD_S_SUCCESS)
{
/* Ifd Handler 3.0 found */
- rContext->dwVersion = IFD_HVERSION_3_0;
+ rContext->version = IFD_HVERSION_3_0;
}
else
{
/* Ifd Handler 2.0 found */
- rContext->dwVersion = IFD_HVERSION_2_0;
+ rContext->version = IFD_HVERSION_2_0;
}
/* The following binds version 1.0 of the IFD Handler specs */
- if (rContext->dwVersion == IFD_HVERSION_1_0)
+ if (rContext->version == IFD_HVERSION_1_0)
{
Log1(PCSC_LOG_INFO, "Loading IFD Handler 1.0");
@@ -802,7 +802,7 @@
GET_ADDRESS_OPTIONALv1(SetProtocolParameters, Set_Protocol_Parameters, )
}
- else if (rContext->dwVersion == IFD_HVERSION_2_0)
+ else if (rContext->version == IFD_HVERSION_2_0)
{
/* The following binds version 2.0 of the IFD Handler specs */
#define GET_ADDRESS_OPTIONALv2(s, code) \
@@ -834,7 +834,7 @@
GET_ADDRESSv2(Control)
}
- else if (rContext->dwVersion == IFD_HVERSION_3_0)
+ else if (rContext->version == IFD_HVERSION_3_0)
{
/* The following binds version 3.0 of the IFD Handler specs */
#define GET_ADDRESS_OPTIONALv3(s, code) \
Modified: trunk/PCSC/src/readerfactory.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/readerfactory.h?rev=4738&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.h (original)
+++ trunk/PCSC/src/readerfactory.h Tue Feb 9 14:44:30 2010
@@ -121,7 +121,7 @@
} psFunctions; /**< driver functions */
LPVOID vHandle; /**< Dlopen handle */
- DWORD dwVersion; /**< IFD Handler version number */
+ int version; /**< IFD Handler version number */
int port; /**< Port ID */
DWORD dwSlot; /**< Current Reader Slot */
DWORD dwBlockStatus; /**< Current blocking status */
Modified: trunk/PCSC/src/winscard.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard.c?rev=4738&op=diff
==============================================================================
--- trunk/PCSC/src/winscard.c (original)
+++ trunk/PCSC/src/winscard.c Tue Feb 9 14:44:30 2010
@@ -1390,7 +1390,7 @@
if (rv != SCARD_S_SUCCESS)
return rv;
- if (IFD_HVERSION_2_0 == rContext->dwVersion)
+ if (IFD_HVERSION_2_0 == rContext->version)
if (NULL == pbSendBuffer || 0 == cbSendLength)
return SCARD_E_INVALID_PARAMETER;
@@ -1411,7 +1411,7 @@
if ((rv = RFCheckReaderEventState(rContext, hCard)) != SCARD_S_SUCCESS)
return rv;
- if (IFD_HVERSION_2_0 == rContext->dwVersion)
+ if (IFD_HVERSION_2_0 == rContext->version)
{
/* we must wrap a API 3.0 client in an API 2.0 driver */
*lpBytesReturned = cbRecvLength;
@@ -1419,7 +1419,7 @@
cbSendLength, pbRecvBuffer, lpBytesReturned);
}
else
- if (IFD_HVERSION_3_0 == rContext->dwVersion)
+ if (IFD_HVERSION_3_0 == rContext->version)
return IFDControl(rContext, dwControlCode, pbSendBuffer,
cbSendLength, pbRecvBuffer, cbRecvLength, lpBytesReturned);
else
@@ -1662,7 +1662,7 @@
tempRxLength = dwRxLength;
if ((pioSendPci->dwProtocol == SCARD_PROTOCOL_RAW)
- && (rContext->dwVersion == IFD_HVERSION_2_0))
+ && (rContext->version == IFD_HVERSION_2_0))
{
rv = IFDControl_v2(rContext, (PUCHAR) pbSendBuffer, cbSendLength,
pbRecvBuffer, &dwRxLength);
More information about the Pcsclite-cvs-commit
mailing list