From cf00a1febf05c13975594dc5a2b7e23572cc1177 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 4 Nov 2007 19:03:01 +0000 Subject: [PATCH] Fix another deadlock Hal spotted and that mysteriously didn't affect FreeBSD. --- errlog.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/errlog.c b/errlog.c index 924999ea..0e672a76 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.59 2007/11/01 12:50:56 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.60 2007/11/03 19:03:31 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,12 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.59 2007/11/01 12:50:56 fabiankeil E * * Revisions : * $Log: errlog.c,v $ + * Revision 1.60 2007/11/03 19:03:31 fabiankeil + * - Prevent the Windows GUI from showing the version two times in a row. + * - Stop using the imperative in the "(Re-)Open logfile" message. + * - Ditch the "Switching to daemon mode" message as the detection + * whether or not we're already in daemon mode doesn't actually work. + * * Revision 1.59 2007/11/01 12:50:56 fabiankeil * Here's looking at you, deadlock. * @@ -522,14 +528,14 @@ void set_debug_level(int debug_level) *********************************************************************/ void disable_logging(void) { - lock_logfile(); if (logfp != NULL) { log_error(LOG_LEVEL_INFO, "No logfile configured. Logging disabled."); + lock_logfile(); fclose(logfp); logfp = NULL; + unlock_logfile(); } - unlock_logfile(); } -- 2.39.2