[Pcsclite-cvs-commit] r5485 - /trunk/pcsc-tools/pcsc_scan.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Wed Jan 5 13:11:48 UTC 2011
Author: rousseau
Date: Wed Jan 5 13:11:40 2011
New Revision: 5485
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5485
Log:
Display if reader PnP mechanism is used
Modified:
trunk/pcsc-tools/pcsc_scan.c
Modified: trunk/pcsc-tools/pcsc_scan.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/pcsc-tools/pcsc_scan.c?rev=5485&op=diff
==============================================================================
--- trunk/pcsc-tools/pcsc_scan.c (original)
+++ trunk/pcsc-tools/pcsc_scan.c Wed Jan 5 13:11:40 2011
@@ -152,8 +152,14 @@
rv = SCardGetStatusChange(hContext, 0, rgReaderStates, 1);
if (rgReaderStates[0].dwEventState & SCARD_STATE_UNKNOWN)
{
- printf("PnP reader name not supported. Using polling.\n");
+ timeout = TIMEOUT;
+ printf("%sPlug'n play reader name not supported. Using polling every %ld ms.%s\n", magenta, timeout, color_end);
pnp = FALSE;
+ }
+ else
+ {
+ timeout = INFINITE;
+ printf("%sUsing reader plug'n play mechanism%s\n", magenta, color_end);
}
get_readers:
@@ -282,12 +288,8 @@
* We only stop in case of an error
*/
if (pnp)
- {
- timeout = INFINITE;
nbReaders++;
- }
- else
- timeout = TIMEOUT;
+
rv = SCardGetStatusChange(hContext, timeout, rgReaderStates_t, nbReaders);
while ((rv == SCARD_S_SUCCESS) || (rv == SCARD_E_TIMEOUT))
{
More information about the Pcsclite-cvs-commit
mailing list