From 9c3c3f64e4bf11808e1e5bc6ada6ffc5c8707a72 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 7 Sep 2008 12:43:44 +0000 Subject: [PATCH] Move the LogPutString() call in log_error() into the locked region so the Windows GUI log is consistent with the logfile. --- errlog.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/errlog.c b/errlog.c index 34bf3489..24062a2e 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.75 2008/09/04 08:13:58 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.76 2008/09/07 12:35:05 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,9 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.75 2008/09/04 08:13:58 fabiankeil E * * Revisions : * $Log: errlog.c,v $ + * Revision 1.76 2008/09/07 12:35:05 fabiankeil + * Add mutex lock support for _WIN32. + * * Revision 1.75 2008/09/04 08:13:58 fabiankeil * Prepare for critical sections on Windows by adding a * layer of indirection before the pthread mutex functions. @@ -1246,13 +1249,14 @@ void log_error(int loglevel, const char *fmt, ...) { fputs(outbuf_save, logfp); } - unlock_logfile(); #if defined(_WIN32) && !defined(_WIN_CONSOLE) /* Write to display */ LogPutString(outbuf_save); #endif /* defined(_WIN32) && !defined(_WIN_CONSOLE) */ + unlock_logfile(); + } -- 2.39.2