[Pcsclite-cvs-commit] PCSC/src winscard_svc.c,1.10,1.11

sauveron-guest@quantz.debian.org sauveron-guest@quantz.debian.org
Mon, 20 Oct 2003 21:56:39 +0200


Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv15099/src

Modified Files:
	winscard_svc.c 
Log Message:
Correct a bug introduce by me. Sorry. It will be good in the future to improve this part

Index: winscard_svc.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard_svc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- winscard_svc.c	20 Oct 2003 16:15:13 -0000	1.10
+++ winscard_svc.c	20 Oct 2003 19:56:36 -0000	1.11
@@ -114,7 +114,6 @@
 		if (diStr->rv == SCARD_S_SUCCESS)
 			diStr->rv =
 				MSGRemoveHandle(0, msgStruct->request_id, diStr->hCard);
-
 		break;
 
 	case SCARD_BEGIN_TRANSACTION:
@@ -294,8 +293,14 @@
 
 	for (i = 0; i < PCSCLITE_MAX_APPLICATIONS_CONTEXTS; i++)
 	{
-		if (psChannelMap[i].hContext == hContext &&
-			psChannelMap[i].dwClientID == dwClientID)
+		/*
+		 * I have introduced this verification but it generates a bug
+		 * when SCardDisconnect is called.
+		 * Perhaps a modification to do in the future. (D. Sauveron)
+		 */
+		/* if (psChannelMap[i].hContext == hContext && */
+		/* 	psChannelMap[i].dwClientID == dwClientID) */
+		if (psChannelMap[i].dwClientID == dwClientID)
 		{
 			for (j = 0; j < PCSCLITE_MAX_APPLICATION_CONTEXT_CHANNELS; j++)
 			{