From: Naffanya Date: Fri, 28 Jun 2013 21:47:06 +0000 (+0300) Subject: code correction: removal spaces X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/9c2dc9baa5ec0c9df9177b16949c7f5396a8f668 code correction: removal spaces --- diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index 09f0970f..c2134f49 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -264,8 +264,10 @@ else if (settings->ReadSettings()) { STG_LOGGER & WriteServLog = GetStgLogger(); + if (settings->GetLogFileName() != "") WriteServLog.SetLogFileName(settings->GetLogFileName()); + WriteServLog("ReadSettings error. %s", settings->GetStrError().c_str()); exit(1); } diff --git a/projects/stargazer/settings_impl.cpp b/projects/stargazer/settings_impl.cpp index 8511794c..92670cb5 100644 --- a/projects/stargazer/settings_impl.cpp +++ b/projects/stargazer/settings_impl.cpp @@ -243,7 +243,7 @@ while (node) { rules = node->getValue(0); } - + if (strcasecmp(node->getName(), "DetailStatWritePeriod") == 0) { if (ParseDetailStatWritePeriod(node->getValue(0)) != 0) @@ -457,13 +457,13 @@ while (node) } } - if (strcasecmp(node->getName(), "ScriptParams") == 0) + if (strcasecmp(node->getName(), "ScriptParams") == 0) + { + for (int i = 0; node->getValue(i) != NULL; ++i) { - for (int i = 0; node->getValue(i) != NULL; ++i) - { - scriptParams.push_back(node->getValue(i)); - } + scriptParams.push_back(node->getValue(i)); } + } node = node->getNextNode(); } diff --git a/projects/stargazer/settings_impl.h b/projects/stargazer/settings_impl.h index 7dc742f5..7ba2708f 100644 --- a/projects/stargazer/settings_impl.h +++ b/projects/stargazer/settings_impl.h @@ -97,7 +97,7 @@ public: const MODULE_SETTINGS & GetStoreModuleSettings() const { return storeModuleSettings; } const std::vector & GetModulesSettings() const - { return modulesSettings; } + { return modulesSettings; } const std::vector & GetScriptParams() const { return scriptParams; } private: @@ -117,7 +117,7 @@ private: std::string rules; std::string logFile; std::string pidFile; - std::string monitorDir; + std::string monitorDir; std::vector scriptParams; bool monitoring; unsigned detailStatWritePeriod; @@ -137,7 +137,7 @@ private: bool reconnectOnTariffChange; std::vector modulesSettings; - MODULE_SETTINGS storeModuleSettings; + MODULE_SETTINGS storeModuleSettings; STG_LOGGER & logger; }; //-----------------------------------------------------------------------------