]> git.stg.codes - stg.git/commitdiff
Ticket. The checking if(!data.tariffConf.changePolicyTimeout.emplty)
authorElena Mamontova <helenh463@gmail.com>
Thu, 17 Nov 2016 08:22:55 +0000 (10:22 +0200)
committerElena Mamontova <helenh463@gmail.com>
Thu, 17 Nov 2016 08:22:55 +0000 (10:22 +0200)
removed and appendResetableTag() added for the changePolicyTimeout
in the Serialize() function.

stglibs/srvconf.lib/parsers/chg_tariff.cpp

index ca4ceb956d95fa0ef1012d4fd8f3b0fa8be52581..16c4b198dbf1d4e605de0a51d22c39f46abf8d4e 100644 (file)
@@ -78,9 +78,7 @@ if (!data.tariffConf.changePolicy.empty())
         case TARIFF::DENY: stream << "<changePolicy value=\"deny\"/>"; break;
         }
 
         case TARIFF::DENY: stream << "<changePolicy value=\"deny\"/>"; break;
         }
 
-if (!data.tariffConf.changePolicyTimeout.empty())
-    stream << "<changePolicyTimeout value=\"" + formatTime(data.tariffConf.changePolicyTimeout.data()) + "\"/>";
-
+appendResetableTag(stream, "changePolicyTimeout", data.tariffConf.changePolicyTimeout);
 for (size_t i = 0; i < DIR_NUM; ++i)
     if (!data.dirPrice[i].hDay.empty() &&
         !data.dirPrice[i].mDay.empty() &&
 for (size_t i = 0; i < DIR_NUM; ++i)
     if (!data.dirPrice[i].hDay.empty() &&
         !data.dirPrice[i].mDay.empty() &&