[Pcsclite-cvs-commit] PCSC/src winscard_clnt.c,1.16,1.17
sauveron-guest@quantz.debian.org
sauveron-guest@quantz.debian.org
Wed, 15 Oct 2003 10:56:14 +0200
Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv2934/src
Modified Files:
winscard_clnt.c
Log Message:
Verify the availabilty of the daemon before to try a connection.
Index: winscard_clnt.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard_clnt.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- winscard_clnt.c 30 Sep 2003 21:01:35 -0000 1.16
+++ winscard_clnt.c 15 Oct 2003 08:56:11 -0000 1.17
@@ -232,6 +232,9 @@
scEstablishStruct.dwScope = dwScope;
scEstablishStruct.phContext = 0;
+ if (SCardCheckDaemonAvailability() != SCARD_S_SUCCESS)
+ return SCARD_E_NO_SERVICE;
+
rv = WrapSHMWrite(SCARD_ESTABLISH_CONTEXT, parentPID,
sizeof(scEstablishStruct), PCSCLITE_MCLIENT_ATTEMPTS,
(void *) &scEstablishStruct);