]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/tariff_helper.cpp
Ticket 37. The 'changePolicy' added to the map structVal in the
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / tariff_helper.cpp
index 85abf8205a5e59822db40850c3b37d4de905be45..548774deae784fa64c57ed51c475e5dfad554287 100644 (file)
@@ -13,6 +13,7 @@ structVal["freemb"] = xmlrpc_c::value_double(data.tariffConf.free);
 structVal["passivecost"] = xmlrpc_c::value_double(data.tariffConf.passiveCost);
 structVal["traffType"] = xmlrpc_c::value_int(data.tariffConf.traffType);
 structVal["period"] = xmlrpc_c::value_string(TARIFF::PeriodToString(data.tariffConf.period));
+structVal["changePolicy"] = xmlrpc_c::value_string(TARIFF::ChangePolicyToString(data.tariffConf.changePolicy));
 
 std::vector<xmlrpc_c::value> prices(DIR_NUM);
 
@@ -63,7 +64,7 @@ if ((it = structVal.find("passivecost")) != structVal.end())
 
 if ((it = structVal.find("traffType")) != structVal.end())
     {
-    data.tariffConf.traffType = xmlrpc_c::value_int(it->second);
+    data.tariffConf.traffType = static_cast<TARIFF::TRAFF_TYPE>(xmlrpc_c::value_int(it->second).cvalue());
     }
 
 if ((it = structVal.find("period")) != structVal.end())