[Pcsclite-cvs-commit] r5769 - /trunk/PCSC/src/eventhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon May 30 09:22:57 UTC 2011


Author: rousseau
Date: Mon May 30 09:22:57 2011
New Revision: 5769

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5769
Log:
EHStatusHandlerThread(): always sleep if the driver card event function
returns an error (and not just in the case of IFD_NO_SUCH_DEVICE)

This avoids to loop too fast in case of a problem. This happens after
activating a smart card reader in vmware workstation for example.

See https://bugs.launchpad.net/ubuntu/+source/pcsc-lite/+bug/787451
"pcscd spams to syslog and kern.log after enabling smartcard reader in
VMWare Workstation"

Modified:
    trunk/PCSC/src/eventhandler.c

Modified: trunk/PCSC/src/eventhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/eventhandler.c?rev=5769&op=diff
==============================================================================
--- trunk/PCSC/src/eventhandler.c (original)
+++ trunk/PCSC/src/eventhandler.c Mon May 30 09:22:57 2011
@@ -429,7 +429,7 @@
 				timeout = PCSCLITE_STATUS_EVENT_TIMEOUT;
 
 			ret = rContext->pthCardEvent(rContext->slot, timeout);
-			if (IFD_NO_SUCH_DEVICE == ret)
+			if (IFD_SUCCESS != ret)
 				(void)SYS_USleep(PCSCLITE_STATUS_POLL_RATE);
 		}
 		else




More information about the Pcsclite-cvs-commit mailing list