]> git.stg.codes - stg.git/blobdiff - projects/stargazer/main.cpp
Ticket 26. The 'return -1' removed, 'else' added for the
[stg.git] / projects / stargazer / main.cpp
index 3c216977b8725adc961712688157125481e3f0f1..644fed9145d7a0d43ab27e64d5a9cdd2927bbbd2 100644 (file)
@@ -338,8 +338,24 @@ while (running)
     switch (sig)
         {
         case SIGHUP:
     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());
+                }
+            else
+                {
+                settings = newSettings;
+                }
             traffCnt.Reload();
             traffCnt.Reload();
-            manager.reload();
+            manager.reload(settings);
+            }
             break;
         case SIGTERM:
             running = false;
             break;
         case SIGTERM:
             running = false;