]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_tariffs.cpp
Merge remote-tracking branch 'temp/ticket37' into ticket
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_tariffs.cpp
index 0607db6fb12fbde08147a0af3418250ae3743bb3..b33b1305ca4e02789427882c2334f87cfb692c64 100644 (file)
@@ -114,6 +114,7 @@ void GET_TARIFFS::CreateAnswer()
                   "<Free value=\"" + x2str(it->tariffConf.free) + "\"/>" +
                   "<TraffType value=\"" + TARIFF::TraffTypeToString(it->tariffConf.traffType) + "\"/>" +
                   "<Period value=\"" + TARIFF::PeriodToString(it->tariffConf.period) + "\"/>" +
+                  "<ChangePolicy value=\"" + TARIFF::ChangePolicyToString(it->tariffConf.changePolicy) + "\"/>" +
                   "</tariff>";
         }
 
@@ -288,6 +289,12 @@ int CHG_TARIFF::Start(void *, const char * el, const char ** attr)
             td.tariffConf.period = TARIFF::StringToPeriod(attr[1]);
             return 0;
         }
+
+        if (strcasecmp(el, "ChangePolicy") == 0)
+        {
+            td.tariffConf.changePolicy = TARIFF::StringToChangePolicy(attr[1]);
+            return 0;
+        }
     }
     return -1;
 }