[Pcsclite-cvs-commit] r5314 - /trunk/PCSC/src/ifdwrapper.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Wed Oct 13 16:23:10 UTC 2010
Author: rousseau
Date: Wed Oct 13 16:23:06 2010
New Revision: 5314
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5314
Log:
IFDPowerICC(): allow to use NULL for pucAtr and pdwAtrLen to make power
down easy with IFDPowerICC(rContext, IFD_POWER_DOWN, NULL, NULL);
Modified:
trunk/PCSC/src/ifdwrapper.c
Modified: trunk/PCSC/src/ifdwrapper.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/ifdwrapper.c?rev=5314&op=diff
==============================================================================
--- trunk/PCSC/src/ifdwrapper.c (original)
+++ trunk/PCSC/src/ifdwrapper.c Wed Oct 13 16:23:06 2010
@@ -333,6 +333,8 @@
#endif
DWORD dwStatus;
UCHAR ucValue[1];
+ UCHAR dummyAtr[MAX_ATR_SIZE];
+ DWORD dummyAtrLen = sizeof(dummyAtr);
#ifndef PCSCLITE_STATIC_DRIVER
RESPONSECODE(*IFD_power_icc) (DWORD) = NULL;
@@ -345,6 +347,11 @@
rv = IFD_SUCCESS;
dwStatus = 0;
ucValue[0] = 0;
+
+ if (NULL == pucAtr)
+ pucAtr = dummyAtr;
+ if (NULL == pdwAtrLen)
+ pdwAtrLen = &dummyAtrLen;
/*
* Check that the card is inserted first
More information about the Pcsclite-cvs-commit
mailing list