From fb083109b84a9f198b4949892b0b816801e1d196 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Fri, 19 Aug 2016 13:48:45 +0300 Subject: [PATCH 1/1] Ticket 37. const TARIFF * tariff definition, tariff checking and tariff->GetTariffData() getting added in the CHG_TARIFF::Start() function. --- .../plugins/configuration/sgconfig/parser_tariffs.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp b/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp index b33b1305..b1564406 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp @@ -171,7 +171,9 @@ int CHG_TARIFF::Start(void *, const char * el, const char ** attr) { if (strcasecmp(el, m_tag.c_str()) == 0) { - td.tariffConf.name = attr[1]; + const TARIFF * tariff = m_tariffs.FindByName(attr[1]); + if (tariff != NULL) + td = tariff->GetTariffData(); return 0; } } -- 2.44.2