[Pcsclite-cvs-commit] r6010 - /trunk/PCSC/src/spy/pcsc-spy.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Oct 7 10:18:41 UTC 2011


Author: rousseau
Date: Fri Oct  7 10:18:40 2011
New Revision: 6010

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6010
Log:
spy_buffer(): use spy_line_direct() to log a line without formatting and
size limit

Modified:
    trunk/PCSC/src/spy/pcsc-spy.c

Modified: trunk/PCSC/src/spy/pcsc-spy.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/pcsc-spy.c?rev=6010&op=diff
==============================================================================
--- trunk/PCSC/src/spy/pcsc-spy.c (original)
+++ trunk/PCSC/src/spy/pcsc-spy.c Fri Oct  7 10:18:40 2011
@@ -146,6 +146,16 @@
 }
 #endif
 
+static void spy_line_direct(char *line)
+{
+	/* spying disabled */
+	if (Log_fd < 0)
+		return;
+
+	write(Log_fd, line, strlen(line));
+	write(Log_fd, "\n", 1);
+}
+
 static void spy_line(const char *fmt, ...)
 {
 	va_list args;
@@ -235,7 +245,7 @@
         }
 		*p = '\0';
 
-        spy_line(log_buffer);
+        spy_line_direct(log_buffer);
     }
 }
 




More information about the Pcsclite-cvs-commit mailing list