[Pcsclite-cvs-commit] r4939 - /trunk/Drivers/ccid/src/commands.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Mon May 10 13:24:29 UTC 2010
Author: rousseau
Date: Mon May 10 13:24:19 2010
New Revision: 4939
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4939
Log:
Revert revision 4936 (stupid me)
Modified:
trunk/Drivers/ccid/src/commands.c
Modified: trunk/Drivers/ccid/src/commands.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/commands.c?rev=4939&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/commands.c (original)
+++ trunk/Drivers/ccid/src/commands.c Mon May 10 13:24:19 2010
@@ -48,6 +48,7 @@
* of 260 bytes since the driver check this value */
#define BOGUS_SCM_FIRMWARE_FOR_dwMaxCCIDMessageLength
+#define max( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
/* internal functions */
@@ -446,7 +447,7 @@
i2dw(a - 10, cmd + 1); /* CCID message length */
old_read_timeout = ccid_descriptor -> readTimeout;
- ccid_descriptor -> readTimeout = min(30, TxBuffer[0]+10)*1000; /* at least 30 seconds */
+ ccid_descriptor -> readTimeout = max(30, TxBuffer[0]+10)*1000; /* at least 30 seconds */
if (WritePort(reader_index, a, cmd) != STATUS_SUCCESS)
{
@@ -674,7 +675,7 @@
i2dw(a - 10, cmd + 1); /* command length (includes bPINOperation) */
old_read_timeout = ccid_descriptor -> readTimeout;
- ccid_descriptor -> readTimeout = min(30, TxBuffer[0]+10)*1000; /* at least 30 seconds */
+ ccid_descriptor -> readTimeout = max(30, TxBuffer[0]+10)*1000; /* at least 30 seconds */
if (WritePort(reader_index, a, cmd) != STATUS_SUCCESS)
{
More information about the Pcsclite-cvs-commit
mailing list