]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
silence app verifier assertion
authorMichael Jerris <mike@jerris.com>
Fri, 10 Oct 2008 18:33:20 +0000 (18:33 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 10 Oct 2008 18:33:20 +0000 (18:33 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9937 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/loggers/mod_console/mod_console.c

index 4ac18d7448a379ebc6206828ce52128bd991cbee..6d883f7001f4e6a42d04999f9036f9fe92650b5e 100644 (file)
@@ -234,8 +234,10 @@ static switch_status_t switch_console_logger(const switch_log_node_t *node, swit
 
                        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);