From: Elena Mamontova Date: Thu, 4 Feb 2016 08:08:37 +0000 (+0200) Subject: Ticket 26. SETTING_IMPL newSettings object - copy of the settings object X-Git-Tag: 2.409~174^2~1^2~50 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/75547270769394b15e275f4817a824dd75ae3f05 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. --- 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;