]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp
Ticket 37. TIMEZONE fixed to TIMESTAMP for change_policy_timeout in
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_tariffs.cpp
index b33b1305ca4e02789427882c2334f87cfb692c64..867181afda0e95631d1d6f459557e4f4b33351cf 100644 (file)
@@ -171,7 +171,11 @@ 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();
+            else
+                return -1;
             return 0;
         }
     }