[Pcsclite-cvs-commit] PCSC/src atrhandler.c,1.6,1.7

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


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

Modified Files:
	atrhandler.c 
Log Message:
make debug messages work when ATR_DEBUG is set


Index: atrhandler.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/atrhandler.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- atrhandler.c	18 Oct 2003 17:19:36 -0000	1.6
+++ atrhandler.c	9 Jun 2004 06:12:59 -0000	1.7
@@ -17,13 +17,14 @@
 #include "wintypes.h"
 #include "pcsclite.h"
 #include "atrhandler.h"
+#include "debuglog.h"
 
 /*
  * Uncomment the following for ATR debugging 
  */
-/*
- * #define ATR_DEBUG 1 
- */
+
+#define ATR_DEBUG 1 
+
 
 short ATRDecodeAtr(PSMARTCARD_EXTENSION psExtension,
 	PUCHAR pucAtr, DWORD dwLength)
@@ -39,6 +40,10 @@
 	 */
 	p = K = TCK = Y1i = T = TAi = TBi = TCi = TDi = 0;
 
+#ifdef ATR_DEBUG
+	DebugXxd("ATR: ", pucAtr, dwLength);
+#endif
+
 	if (dwLength < 2)
 	{
 		return 0;	/* Atr must have TS and T0 */
@@ -81,7 +86,7 @@
 	p = 2;
 
 #ifdef ATR_DEBUG
-	debug_msg("Conv %02X, Y1 %02X, K %02X",
+	debug_msg("Conv: %02X, Y1: %02X, K: %02X",
 		psExtension->CardCapabilities.Convention, Y1i, K);
 #endif