[Pcsclite-cvs-commit] PCSC/src winscard.c,1.30,1.31

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


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

Modified Files:
	winscard.c 
Log Message:
print the Send Protocol in T=? format instead of internal representation
value.


Index: winscard.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- winscard.c	15 Jun 2004 20:49:46 -0000	1.30
+++ winscard.c	16 Jun 2004 12:44:05 -0000	1.31
@@ -237,7 +237,7 @@
 		DebugLogB("Active Protocol: unknown %d", *pdwActiveProtocol);
 	else
 		DebugLogB("Active Protocol: T=%d",
-			*pdwActiveProtocol == SCARD_PROTOCOL_T0 ? 0 : 1);
+			(*pdwActiveProtocol == SCARD_PROTOCOL_T0) ? 0 : 1);
 
 	/*
 	 * Prepare the SCARDHANDLE identity
@@ -1398,7 +1398,12 @@
 
 	sSendPci.Length = pioSendPci->cbPciLength;
 
-	DebugLogB("Send Protocol: %d", sSendPci.Protocol);
+	if ((sSendPci.Protocol != SCARD_PROTOCOL_T0)
+		&& (sSendPci.Protocol != SCARD_PROTOCOL_T1))
+		DebugLogB("Send Protocol: unknown %d", sSendPci.Protocol);
+	else
+		DebugLogB("Send Protocol: T=%d",
+			(sSendPci.Protocol == SCARD_PROTOCOL_T0) ? 0 : 1);
 
 	tempRxLength = dwRxLength;