X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/41ef27bc78218657d477a8f4334dede5d09ab38d..9f01f72d7b1da24b97bcfed87a41f37fd88e7d10:/projects/stargazer/settings_impl.cpp diff --git a/projects/stargazer/settings_impl.cpp b/projects/stargazer/settings_impl.cpp index d5fb2dad..f9135a1a 100644 --- a/projects/stargazer/settings_impl.cpp +++ b/projects/stargazer/settings_impl.cpp @@ -63,6 +63,8 @@ SETTINGS_IMPL::SETTINGS_IMPL() writeFreeMbTraffCost(false), showFeeInCash(true), messageTimeout(0), + feeChargeType(0), + reconnectOnTariffChange(false), modulesSettings(), storeModuleSettings(), logger(GetStgLogger()) @@ -93,6 +95,8 @@ SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd) writeFreeMbTraffCost(false), showFeeInCash(true), messageTimeout(0), + feeChargeType(0), + reconnectOnTariffChange(false), modulesSettings(), storeModuleSettings(), logger(GetStgLogger()) @@ -123,6 +127,8 @@ SETTINGS_IMPL::SETTINGS_IMPL(const SETTINGS_IMPL & rval) writeFreeMbTraffCost(rval.writeFreeMbTraffCost), showFeeInCash(rval.showFeeInCash), messageTimeout(rval.messageTimeout), + feeChargeType(rval.feeChargeType), + reconnectOnTariffChange(rval.reconnectOnTariffChange), modulesSettings(rval.modulesSettings), storeModuleSettings(rval.storeModuleSettings), logger(GetStgLogger()) @@ -429,6 +435,24 @@ while (node) } } + if (strcasecmp(node->getName(), "FeeChargeType") == 0) + { + if (ParseUnsignedInRange(node->getValue(0), 0, 2, &feeChargeType) != 0) + { + strError = "Incorrect FeeChargeType value: \'" + string(node->getValue(0)) + "\'"; + return -1; + } + } + + 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();