From 75547270769394b15e275f4817a824dd75ae3f05 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Thu, 4 Feb 2016 10:08:37 +0200 Subject: [PATCH] Ticket 26. SETTING_IMPL newSettings object - copy of the settings object added. The newSetings.ReadSettings() call and checking of result added in the 'switch' after the case SIGHUP. --- projects/stargazer/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index 73786c4e..b8857633 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -221,6 +221,7 @@ if (getuid()) } SETTINGS_IMPL settings(argc == 2 ? argv[1] : ""); +SETTINGS_IMPL newSettings = settings; if (settings.ReadSettings()) { @@ -338,6 +339,16 @@ while (running) switch (sig) { case SIGHUP: + if (newSettings.ReadSettings()) + { + STG_LOGGER & WriteServLog = GetStgLogger(); + + if (newSettings.GetLogFileName() != "") + WriteServLog.SetLogFileName(newSettings.GetLogFileName()); + + WriteServLog("ReadSettings error. %s", newSettings.GetStrError().c_str()); + return -1; + } traffCnt.Reload(); manager.reload(); break; -- 2.44.2