[Freeswitch-svn] [commit] r9937 - freeswitch/trunk/src/mod/loggers/mod_console

Freeswitch SVN mikej at freeswitch.org
Fri Oct 10 14:33:21 EDT 2008


Author: mikej
Date: Fri Oct 10 14:33:20 2008
New Revision: 9937

Modified:
   freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c

Log:
silence app verifier assertion

Modified: freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c	(original)
+++ freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c	Fri Oct 10 14:33:20 2008
@@ -234,8 +234,10 @@
 
 			if (COLORIZE) {
 #ifdef WIN32
+				DWORD len = (DWORD) strlen(node->data);
+				DWORD outbytes = 0;
 				SetConsoleTextAttribute(hStdout, COLORS[node->level]);
-				WriteFile(hStdout, node->data, (DWORD) strlen(node->data), NULL, NULL);
+				WriteFile(hStdout, node->data, len, &outbytes, NULL);
 				SetConsoleTextAttribute(hStdout, wOldColorAttrs);
 #else
 				fprintf(handle, "%s%s%s", COLORS[node->level], node->data, SWITCH_SEQ_DEFAULT_COLOR);



More information about the Freeswitch-svn mailing list