[Pcsclite-cvs-commit] r1738 - trunk/Drivers/ccid/src/openct
Ludovic Rousseau
rousseau at costa.debian.org
Thu Nov 24 14:19:31 UTC 2005
Author: rousseau
Date: 2005-11-24 14:19:30 +0000 (Thu, 24 Nov 2005)
New Revision: 1738
Modified:
trunk/Drivers/ccid/src/openct/proto-t1.c
Log:
t1_xcv(): the second argument of CCID_Receive() is (unsigned int *)
so we can't use &rmax since &rmax is a (size_t *) and may not
be the same on 64-bits architectures for example (iMac G5) */
Modified: trunk/Drivers/ccid/src/openct/proto-t1.c
===================================================================
--- trunk/Drivers/ccid/src/openct/proto-t1.c 2005-11-24 13:50:24 UTC (rev 1737)
+++ trunk/Drivers/ccid/src/openct/proto-t1.c 2005-11-24 14:19:30 UTC (rev 1738)
@@ -657,6 +657,7 @@
int n, m;
_ccid_descriptor *ccid_desc ;
int oldReadTimeout;
+ unsigned int rmax_int;
DEBUG_XXD("sending: ", block, slen);
@@ -679,7 +680,13 @@
if (n != IFD_SUCCESS)
return n;
- n = CCID_Receive(t1 -> lun, &rmax, block);
+ /* the second argument of CCID_Receive() is (unsigned int *)
+ * so we can't use &rmax since rmax is a (size_t *) and may not
+ * be the same on 64-bits architectures for example (iMac G5) */
+ rmax_int = rmax;
+ n = CCID_Receive(t1 -> lun, &rmax_int, block);
+ rmax = rmax_int;
+
if (n == IFD_PARITY_ERROR)
return -2;
if (n != IFD_SUCCESS)
@@ -691,7 +698,9 @@
if (n != IFD_SUCCESS)
return n;
- n = CCID_Receive(t1 -> lun, &rmax, &block[3]);
+ rmax_int = rmax;
+ n = CCID_Receive(t1 -> lun, &rmax_int, &block[3]);
+ rmax = rmax_int;
if (n == IFD_PARITY_ERROR)
return -2;
if (n != IFD_SUCCESS)
@@ -707,7 +716,9 @@
return n;
/* Get the response en bloc */
- n = CCID_Receive(t1 -> lun, &rmax, block);
+ rmax_int = rmax;
+ n = CCID_Receive(t1 -> lun, &rmax_int, block);
+ rmax = rmax_int;
if (n == IFD_PARITY_ERROR)
return -2;
if (n != IFD_SUCCESS)
More information about the Pcsclite-cvs-commit
mailing list