From 37421c11a1bec40889c63b5fca498dfdb616721a Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Mon, 11 Oct 2010 18:43:07 +0000 Subject: [PATCH] added workaround for bug 312754 of pcsc-lite git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@322 96b47cad-a561-4643-ad3b-153ac7d7599c --- virtualsmartcard/src/vpcd/ifd.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/virtualsmartcard/src/vpcd/ifd.c b/virtualsmartcard/src/vpcd/ifd.c index 3ec9cfc..a9ca1c0 100644 --- a/virtualsmartcard/src/vpcd/ifd.c +++ b/virtualsmartcard/src/vpcd/ifd.c @@ -3,8 +3,11 @@ #include -/* XXX see bug #312749 on https://alioth.debian.org/projects/pcsclite/ */ -/*#define IFDHANDLERv2*/ +/* XXX see bug #312749 on https://alioth.debian.org/projects/pcsclite/ + * should use the right reader.conf, but pcscd older than r5294 will throw an + * error with the new configuration + * */ +#define IFDHANDLERv2 #include #include @@ -141,8 +144,11 @@ IFDHPowerICC (DWORD Lun, DWORD Action, PUCHAR Atr, PDWORD AtrLength) return IFD_COMMUNICATION_ERROR; } + /* XXX see bug #312754 on https://alioth.debian.org/projects/pcsclite */ +#if 0 *AtrLength = 0; +#endif return IFD_SUCCESS; case IFD_POWER_UP: if (vicc_poweron() < 0) { @@ -161,11 +167,6 @@ IFDHPowerICC (DWORD Lun, DWORD Action, PUCHAR Atr, PDWORD AtrLength) return IFD_NOT_SUPPORTED; } - /* XXX this is a workaround - * pcscd should normally set the length to the number of bytes in Atr */ - if (!*AtrLength) - *AtrLength = MAX_ATR_SIZE; - return IFDHGetCapabilities (Lun, TAG_IFD_ATR, AtrLength, Atr); }