]> git.stg.codes - stg.git/commitdiff
Ticket 37. const TARIFF * tariff definition, tariff checking and tariff->GetTariffData()
authorElena Mamontova <helenh463@gmail.com>
Fri, 19 Aug 2016 10:48:45 +0000 (13:48 +0300)
committerElena Mamontova <helenh463@gmail.com>
Fri, 19 Aug 2016 10:48:45 +0000 (13:48 +0300)
getting added in the CHG_TARIFF::Start() function.

projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp

index b33b1305ca4e02789427882c2334f87cfb692c64..b1564406f7bc7f9f51eec8ffdae7550f99d66f36 100644 (file)
@@ -171,7 +171,9 @@ int CHG_TARIFF::Start(void *, const char * el, const char ** attr)
     {
         if (strcasecmp(el, m_tag.c_str()) == 0)
         {
     {
         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;
         }
     }
             return 0;
         }
     }