[Pcsclite-cvs-commit] PCSC/src winscard_svc.c,1.28,1.29
rousseau@haydn.debian.org
rousseau@haydn.debian.org
Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv609
Modified Files:
winscard_svc.c
Log Message:
MSGCleanupClient(): always reset all the fields. Thanks to Michael Gold for
the patch.
Closes: [ #300863 ] Clear dwClientID in MSGCleanupClient
Index: winscard_svc.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard_svc.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- winscard_svc.c 2 Aug 2004 21:59:36 -0000 1.28
+++ winscard_svc.c 3 Aug 2004 19:52:02 -0000 1.29
@@ -448,11 +448,12 @@
LONG MSGCleanupClient(DWORD dwContextIndex)
{
- if (psContext[dwContextIndex].hContext == 0)
- return 0;
+ if (psContext[dwContextIndex].hContext != 0)
+ {
+ SCardReleaseContext(psContext[dwContextIndex].hContext);
+ MSGRemoveContext(psContext[dwContextIndex].hContext, dwContextIndex);
+ }
- SCardReleaseContext(psContext[dwContextIndex].hContext);
- MSGRemoveContext(psContext[dwContextIndex].hContext, dwContextIndex);
psContext[dwContextIndex].dwClientID = 0;
psContext[dwContextIndex].protocol_major = 0;
psContext[dwContextIndex].protocol_minor = 0;