[Pcsclite-cvs-commit] PCSC/src winscard.c,1.39,1.40

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv28023

Modified Files:
	winscard.c 
Log Message:
...->cardProtocol = SCARD_PROTOCOL_UNSET; after a power up so that
the next SCardConnect() with perform a PPS with the desired protocol


Index: winscard.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- winscard.c	2 Aug 2004 20:05:26 -0000	1.39
+++ winscard.c	2 Aug 2004 20:08:42 -0000	1.40
@@ -589,7 +589,6 @@
 	if (dwDisposition == SCARD_RESET_CARD ||
 		dwDisposition == SCARD_UNPOWER_CARD)
 	{
-
 		/*
 		 * Currently pcsc-lite keeps the card powered constantly
 		 */
@@ -607,6 +606,9 @@
 				&rContext->readerState->cardAtrLength);
 		}
 
+		/* the protocol is unset after a power on */
+		rContext->readerState->cardProtocol = SCARD_PROTOCOL_UNSET;
+
 		/*
 		 * Notify the card has been reset
 		 */
@@ -637,7 +639,6 @@
 			rContext->readerState->readerState &= ~SCARD_NEGOTIABLE;
 			rContext->readerState->readerState &= ~SCARD_SPECIFIC;
 			rContext->readerState->readerState &= ~SCARD_UNKNOWN;
-			rContext->readerState->cardProtocol = 0;
 			rContext->readerState->cardAtrLength = 0;
 		}