src/nhttpd: fix segfault if logging on

This commit is contained in:
satbaby
2012-12-07 11:13:51 +01:00
parent 2fbe881180
commit fe16513b4f
3 changed files with 7 additions and 3 deletions

View File

@@ -77,7 +77,10 @@ void CLogging::printf(const char *fmt, ...) {
va_end(arglist);
pthread_mutex_lock(&Log_mutex);
::printf(buffer);
buffer[bufferlen-1]='\0';
::printf("%s",buffer);
fflush(stdout);
if (LogToFile) {
; //FIXME Logging to File
}