X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/cc7685dc764b43b8a9a061f4a38549f1c04fe047..aa24fde9f922b0dd8c37ed16ac84aa77157c50ae:/projects/stargazer/settings_impl.cpp diff --git a/projects/stargazer/settings_impl.cpp b/projects/stargazer/settings_impl.cpp index 33b3e840..d197efc4 100644 --- a/projects/stargazer/settings_impl.cpp +++ b/projects/stargazer/settings_impl.cpp @@ -40,7 +40,8 @@ using namespace std; //----------------------------------------------------------------------------- SETTINGS_IMPL::SETTINGS_IMPL() - : strError(), + : SETTINGS(), + strError(), modulesPath("/usr/lib/stg"), dirName(DIR_NUM), confDir("/etc/stargazer"), @@ -64,6 +65,7 @@ SETTINGS_IMPL::SETTINGS_IMPL() showFeeInCash(true), messageTimeout(0), feeChargeType(0), + reconnectOnTariffChange(false), modulesSettings(), storeModuleSettings(), logger(GetStgLogger()) @@ -71,7 +73,8 @@ SETTINGS_IMPL::SETTINGS_IMPL() } //----------------------------------------------------------------------------- SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd) - : strError(), + : SETTINGS(), + strError(), modulesPath("/usr/lib/stg"), dirName(DIR_NUM), confDir(cd), @@ -95,6 +98,7 @@ SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd) showFeeInCash(true), messageTimeout(0), feeChargeType(0), + reconnectOnTariffChange(false), modulesSettings(), storeModuleSettings(), logger(GetStgLogger()) @@ -102,7 +106,8 @@ SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd) } //----------------------------------------------------------------------------- SETTINGS_IMPL::SETTINGS_IMPL(const SETTINGS_IMPL & rval) - : strError(), + : SETTINGS(), + strError(), modulesPath(rval.modulesPath), dirName(rval.dirName), confDir(rval.confDir), @@ -126,6 +131,7 @@ SETTINGS_IMPL::SETTINGS_IMPL(const SETTINGS_IMPL & rval) showFeeInCash(rval.showFeeInCash), messageTimeout(rval.messageTimeout), feeChargeType(rval.feeChargeType), + reconnectOnTariffChange(rval.reconnectOnTariffChange), modulesSettings(rval.modulesSettings), storeModuleSettings(rval.storeModuleSettings), logger(GetStgLogger()) @@ -441,6 +447,15 @@ while (node) } } + if (strcasecmp(node->getName(), "ReconnectOnTariffChange") == 0) + { + if (ParseYesNo(node->getValue(0), &reconnectOnTariffChange) != 0) + { + strError = "Incorrect ReconnectOnTariffChange value: \'" + string(node->getValue(0)) + "\'"; + return -1; + } + } + if (strcasecmp(node->getName(), "DirNames") == 0) { const DOTCONFDocumentNode * child = node->getChildNode();