]> git.stg.codes - stg.git/blobdiff - projects/stargazer/main.cpp
Ticket 26. In the reload() function modSettings vector is defined, a cycle for the
[stg.git] / projects / stargazer / main.cpp
index 73786c4efd6c0cc46ba8aa805b9edaca0d9687cb..b878b39c41cf5ca146a81ce7712fb3f1e7c4c684 100644 (file)
@@ -338,8 +338,22 @@ while (running)
     switch (sig)
         {
         case SIGHUP:
+            {
+            SETTINGS_IMPL newSettings(settings);
+            if (newSettings.ReadSettings())
+                {
+                STG_LOGGER & WriteServLog = GetStgLogger();
+
+                if (newSettings.GetLogFileName() != "")
+                    WriteServLog.SetLogFileName(newSettings.GetLogFileName());
+
+                WriteServLog("ReadSettings error. %s", newSettings.GetStrError().c_str());
+                return -1;
+                }
+            settings = newSettings;
             traffCnt.Reload();
-            manager.reload();
+            manager.reload(settings);
+            }
             break;
         case SIGTERM:
             running = false;