[Pcsclite-cvs-commit] r2528 - trunk/PCSC/src
rousseau at alioth.debian.org
rousseau at alioth.debian.org
Tue May 15 20:55:21 UTC 2007
Author: rousseau
Date: 2007-05-15 20:55:20 +0000 (Tue, 15 May 2007)
New Revision: 2528
Modified:
trunk/PCSC/src/winscard_msg.c
Log:
SHMMessageReceive(): on the client side, if the daemon does not respond
after 2 minutes (PCSCLITE_CLIENT_ATTEMPTS) we call
SCardCheckDaemonAvailability() to be sure the daemon is still there and
continue waiting.
Thanks to Harsh Sangal for the bug report
Modified: trunk/PCSC/src/winscard_msg.c
===================================================================
--- trunk/PCSC/src/winscard_msg.c 2007-05-15 20:53:49 UTC (rev 2527)
+++ trunk/PCSC/src/winscard_msg.c 2007-05-15 20:55:20 UTC (rev 2528)
@@ -351,11 +351,30 @@
}
} else if (selret == 0)
{
+#ifdef PCSCD
/*
* timeout
*/
retval = -1;
break;
+#else
+ /* is the daemon still there? */
+ if (SCardCheckDaemonAvailability() != SCARD_S_SUCCESS)
+ {
+ /*
+ * timeout
+ */
+ retval = -1;
+ break;
+ }
+
+ /* the command is extra slow so we keep waiting */
+ start = time(0);
+
+ /* you need to set the env variable PCSCLITE_DEBUG=0 since this is
+ * logged on the client side and not on the pcscd side*/
+ Log1(PCSC_LOG_INFO, "Command not yet finished");
+#endif
} else
{
/*
More information about the Pcsclite-cvs-commit
mailing list