[Pcsclite-cvs-commit] PCSC/src debuglog.c,1.15,1.16

rousseau@quantz.debian.org rousseau@quantz.debian.org
Mon, 22 Sep 2003 14:14:27 +0200


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

Modified Files:
	debuglog.c 
Log Message:
use a local output buffer instead of a global one to be thread safe


Index: debuglog.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/debuglog.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- debuglog.c	8 Sep 2003 08:50:50 -0000	1.15
+++ debuglog.c	22 Sep 2003 12:14:25 -0000	1.16
@@ -33,8 +33,6 @@
 /* Max string size when dumping a 256 bytes longs APDU */
 #define DEBUG_BUF_SIZE (256*3+30)
 
-static char DebugBuffer[DEBUG_BUF_SIZE];
-
 static int lSuppress = DEBUGLOG_LOG_ENTRIES;
 static int debug_msg_type = DEBUGLOG_NO_DEBUG;
 static int debug_category = DEBUG_CATEGORY_NOTHING;
@@ -42,6 +40,7 @@
 
 void debug_msg(const char *fmt, ...)
 {
+	char DebugBuffer[DEBUG_BUF_SIZE];
 	va_list argptr;
 
 	if (lSuppress != DEBUGLOG_LOG_ENTRIES)
@@ -100,6 +99,7 @@
 
 void debug_xxd(const char *msg, const unsigned char *buffer, const int len)
 {
+	char DebugBuffer[DEBUG_BUF_SIZE];
 	int i;
 	unsigned char *c, *debug_buf_end;