[Pcsclite-cvs-commit] r5830 - /trunk/PCSC/src/testpcsc.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Jul 5 21:54:15 UTC 2011
Author: rousseau
Date: Tue Jul 5 21:54:15 2011
New Revision: 5830
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5830
Log:
pioRecvPci really need to be allocated by the caller since it is filled
by SCardTransmit() as a return parameter.
Modified:
trunk/PCSC/src/testpcsc.c
Modified: trunk/PCSC/src/testpcsc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/testpcsc.c?rev=5830&op=diff
==============================================================================
--- trunk/PCSC/src/testpcsc.c (original)
+++ trunk/PCSC/src/testpcsc.c Tue Jul 5 21:54:15 2011
@@ -79,7 +79,7 @@
DWORD i;
int p, iReader;
int iList[16];
- SCARD_IO_REQUEST *pioRecvPci;
+ SCARD_IO_REQUEST ioRecvPci = *SCARD_PCI_T0; /* use a default value */
SCARD_IO_REQUEST *pioSendPci;
unsigned char bSendBuffer[MAX_BUFFER_SIZE];
unsigned char bRecvBuffer[MAX_BUFFER_SIZE];
@@ -219,13 +219,13 @@
switch(dwPref)
{
case SCARD_PROTOCOL_T0:
- pioSendPci = pioRecvPci = SCARD_PCI_T0;
+ pioSendPci = SCARD_PCI_T0;
break;
case SCARD_PROTOCOL_T1:
- pioSendPci = pioRecvPci =SCARD_PCI_T1;
+ pioSendPci = SCARD_PCI_T1;
break;
case SCARD_PROTOCOL_RAW:
- pioSendPci = pioRecvPci =SCARD_PCI_RAW;
+ pioSendPci = SCARD_PCI_RAW;
break;
default:
printf("Unknown protocol\n");
@@ -243,7 +243,7 @@
printf("Testing SCardTransmit\t\t: ");
rv = SCardTransmit(hCard, pioSendPci, bSendBuffer, send_length,
- pioRecvPci, bRecvBuffer, &length);
+ &ioRecvPci, bRecvBuffer, &length);
test_rv(rv, hContext, PANIC);
printf(" card response:" GREEN);
for (i=0; i<length; i++)
More information about the Pcsclite-cvs-commit
mailing list