]> git.stg.codes - stg.git/commitdiff
Ticket 37. IBPP::Timestamp policyTimeout variable added, time_t2ts()
authorElena Mamontova <helenh463@gmail.com>
Mon, 17 Oct 2016 13:40:55 +0000 (16:40 +0300)
committerElena Mamontova <helenh463@gmail.com>
Mon, 17 Oct 2016 13:40:55 +0000 (16:40 +0300)
call added, Set() call for the policyTimeout added in the
SaveTariff() function.

projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp

index aebfdb88f52a926255d4446295d979093f6d0fbb..72d838512b1ee38306ab2efb69b9591d4a0a37a5 100644 (file)
@@ -173,7 +173,12 @@ try
     if (schemaVersion > 0)
         st->Set(5, TARIFF::PeriodToString(td.tariffConf.period));
     if (schemaVersion > 1)
     if (schemaVersion > 0)
         st->Set(5, TARIFF::PeriodToString(td.tariffConf.period));
     if (schemaVersion > 1)
+        {
         st->Set(6, TARIFF::ChangePolicyToString(td.tariffConf.changePolicy));
         st->Set(6, TARIFF::ChangePolicyToString(td.tariffConf.changePolicy));
+        IBPP::Timestamp policyTimeout;
+        time_t2ts(td.tariffConf.changePolicyTimeout, &policyTimeout);
+        st->Set(7, policyTimeout);
+        }
 
     st->Set(7, id);
     st->Execute();
 
     st->Set(7, id);
     st->Execute();