[Pcsclite-cvs-commit] r6016 - /trunk/PCSC/src/winscard_clnt.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Oct 7 16:48:09 UTC 2011


Author: rousseau
Date: Fri Oct  7 16:48:08 2011
New Revision: 6016

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6016
Log:
SCardEstablishContext(): If the daemon is not present then just fail
without waiting.

See Red Hat Bug 653903 - elinks takes 10 seconds to start
https://bugzilla.redhat.com/show_bug.cgi?id=653903

Modified:
    trunk/PCSC/src/winscard_clnt.c

Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=6016&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Fri Oct  7 16:48:08 2011
@@ -481,6 +481,14 @@
 		else
 		{
 			int pid;
+			struct stat mystat;
+
+			/* If the daemon is not present then just fail without waiting */
+			if (stat(PCSCD_BINARY, &mystat))
+			{
+				Log2(PCSC_LOG_CRITICAL, "stat " PCSCD_BINARY " failed: %s", strerror(errno));
+				return SCARD_E_NO_SERVICE;
+			}
 
 			pid = fork();
 




More information about the Pcsclite-cvs-commit mailing list