[Pcsclite-cvs-commit] r2788 - /trunk/Drivers/ccid/src/ifdhandler.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Mon Feb 4 14:01:22 UTC 2008
Author: rousseau
Date: Mon Feb 4 14:01:22 2008
New Revision: 2788
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2788
Log:
on an ICCD device the card is always inserted so no card movement will
ever happen: just do nothing in the TAG_IFD_POLLING_THREAD thread
Modified:
trunk/Drivers/ccid/src/ifdhandler.c
Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=2788&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Mon Feb 4 14:01:22 2008
@@ -58,6 +58,7 @@
/* local functions */
static RESPONSECODE IFDHPolling(DWORD Lun);
+static RESPONSECODE IFDHSleep(DWORD Lun);
static void init_driver(void);
static void extra_egt(ATR_t *atr, _ccid_descriptor *ccid_desc, DWORD Protocol);
static char find_baud_rate(unsigned int baudrate, unsigned int *list);
@@ -264,6 +265,14 @@
return IFD_NO_SUCH_DEVICE;
return IFD_COMMUNICATION_ERROR;
}
+
+/* on an ICCD device the card is always inserted
+ * so no card movement will ever happen: just do nothing */
+static RESPONSECODE IFDHSleep(DWORD Lun)
+{
+ sleep(60*60); /* 1 hour */
+ return IFD_SUCCESS;
+}
#endif
@@ -373,6 +382,9 @@
case TAG_IFD_POLLING_THREAD:
{
_ccid_descriptor *ccid_desc;
+
+ /* default value: not supported */
+ *Length = 0;
ccid_desc = get_ccid_descriptor(reader_index);
/* CCID and not ICCD */
@@ -383,6 +395,14 @@
*Length = sizeof(void *);
if (Value)
*(void **)Value = IFDHPolling;
+ }
+
+ if ((ICCD_A == ccid_desc->bInterfaceProtocol)
+ || (ICCD_B == ccid_desc->bInterfaceProtocol))
+ {
+ *Length = sizeof(void *);
+ if (Value)
+ *(void **)Value = IFDHSleep;
}
}
break;
More information about the Pcsclite-cvs-commit
mailing list