X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7dc3852ce6e3c2344e2de0815c1c79fc6b849bcf..92f801286d90e89f800f8768e01da2a0be7cd7e8:/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp b/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp index 867181af..daf4ef62 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp @@ -115,6 +115,7 @@ void GET_TARIFFS::CreateAnswer() "tariffConf.traffType) + "\"/>" + "tariffConf.period) + "\"/>" + "tariffConf.changePolicy) + "\"/>" + + "tariffConf.changePolicyTimeout) + "\"/>" + ""; } @@ -299,6 +300,14 @@ int CHG_TARIFF::Start(void *, const char * el, const char ** attr) td.tariffConf.changePolicy = TARIFF::StringToChangePolicy(attr[1]); return 0; } + + if (strcasecmp(el, "ChangePolicyTimeout") == 0) + { + int64_t policyTime = 0; + if (str2x(attr[1], policyTime) == 0) + td.tariffConf.changePolicyTimeout = (time_t)policyTime; + return 0; + } } return -1; }