From: Elena Mamontova Date: Fri, 19 Aug 2016 10:48:45 +0000 (+0300) Subject: Ticket 37. const TARIFF * tariff definition, tariff checking and tariff->GetTariffData() X-Git-Tag: 2.409~116 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/fb083109b84a9f198b4949892b0b816801e1d196?hp=f971bb53a8b621f48d97e0a54fd88ef6903b99ec Ticket 37. const TARIFF * tariff definition, tariff checking and tariff->GetTariffData() getting added in the CHG_TARIFF::Start() function. --- 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; } }