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

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


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

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.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- winscard.c	2 Aug 2004 20:08:42 -0000	1.40
+++ winscard.c	2 Aug 2004 20:12:44 -0000	1.41
@@ -363,6 +363,9 @@
 				&rContext->readerState->cardAtrLength);
 		}
 
+		/* the protocol is unset after a power on */
+		rContext->readerState->cardProtocol = SCARD_PROTOCOL_UNSET;
+
 		/*
 		 * Notify the card has been reset
 		 * Not doing this could result in deadlock
@@ -416,7 +419,6 @@
 					rContext->readerState->readerState &= ~SCARD_NEGOTIABLE;
 					rContext->readerState->readerState &= ~SCARD_SPECIFIC;
 					rContext->readerState->readerState &= ~SCARD_UNKNOWN;
-					rContext->readerState->cardProtocol = 0;
 					rContext->readerState->cardAtrLength = 0;
 				}
 
@@ -815,6 +817,9 @@
 				&rContext->readerState->cardAtrLength);
 		}
 
+		/* the protocol is unset after a power on */
+		rContext->readerState->cardProtocol = SCARD_PROTOCOL_UNSET;
+
 		/*
 		 * Notify the card has been reset
 		 */
@@ -845,7 +850,6 @@
 			rContext->readerState->readerState &= ~SCARD_NEGOTIABLE;
 			rContext->readerState->readerState &= ~SCARD_SPECIFIC;
 			rContext->readerState->readerState &= ~SCARD_UNKNOWN;
-			rContext->readerState->cardProtocol = 0;
 			rContext->readerState->cardAtrLength = 0;
 		}