From: Elena Mamontova Date: Tue, 9 Feb 2016 15:57:06 +0000 (+0200) Subject: Ticket 26. The SETTINGS_IMPL newSettings object declaration moved into X-Git-Tag: 2.409~174^2~1^2~49 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/5f488a67d8dae833dcd29b65804abf7904a90a86?ds=sidebyside Ticket 26. The SETTINGS_IMPL newSettings object declaration moved into case SIGHUP. The settings = newSettings added to case SIGHUP. --- diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index b8857633..860800f8 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -221,7 +221,6 @@ if (getuid()) } SETTINGS_IMPL settings(argc == 2 ? argv[1] : ""); -SETTINGS_IMPL newSettings = settings; if (settings.ReadSettings()) { @@ -339,6 +338,8 @@ while (running) switch (sig) { case SIGHUP: + { + SETTINGS_IMPL newSettings(settings); if (newSettings.ReadSettings()) { STG_LOGGER & WriteServLog = GetStgLogger(); @@ -349,8 +350,10 @@ while (running) WriteServLog("ReadSettings error. %s", newSettings.GetStrError().c_str()); return -1; } + settings = newSettings; traffCnt.Reload(); manager.reload(); + } break; case SIGTERM: running = false;