From: Alan T. DeKok Date: Fri, 5 Jun 2015 18:27:45 +0000 (-0400) Subject: re-open log file even if no config was changed X-Git-Tag: release_3_0_9~244 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c585a457a5ca6ac925476bf1aec0647396b84f5;p=thirdparty%2Ffreeradius-server.git re-open log file even if no config was changed --- diff --git a/src/main/mainconfig.c b/src/main/mainconfig.c index 38a58ae82a9..73087ac8034 100644 --- a/src/main/mainconfig.c +++ b/src/main/mainconfig.c @@ -1056,6 +1056,15 @@ void main_config_hup(void) CONF_SECTION *cs; char buffer[1024]; + /* + * Re-open the log file. If we can't, then keep logging + * to the old log file. + * + * The "open log file" code is here rather than in log.c, + * because it makes that function MUCH simpler. + */ + hup_logfile(); + if (!cf_file_changed(cs_cache->cs)) { INFO("HUP - No files changed. Ignoring"); return; @@ -1094,15 +1103,6 @@ void main_config_hup(void) cc->next = cs_cache; cs_cache = cc; - /* - * Re-open the log file. If we can't, then keep logging - * to the old log file. - * - * The "open log file" code is here rather than in log.c, - * because it makes that function MUCH simpler. - */ - hup_logfile(); - INFO("HUP - loading modules"); /*