From 5f488a67d8dae833dcd29b65804abf7904a90a86 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Tue, 9 Feb 2016 17:57:06 +0200 Subject: [PATCH 1/1] Ticket 26. The SETTINGS_IMPL newSettings object declaration moved into case SIGHUP. The settings = newSettings added to case SIGHUP. --- projects/stargazer/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.44.2