From dbd170cc6a6787325b3bd00391f2727041ea4ad9 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Mon, 28 Nov 2016 15:31:52 +0200 Subject: [PATCH] Ticket. The time_t currentTime parameter added in TariffChangeIsAllow() function decfinition. The time_t timeout variable and construction if ((currentTime > timeout) && (timeout != 0)) added in TariffChangeIsAllowed(). --- projects/stargazer/tariff_impl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/stargazer/tariff_impl.cpp b/projects/stargazer/tariff_impl.cpp index a3084fbc..2daaeeb3 100644 --- a/projects/stargazer/tariff_impl.cpp +++ b/projects/stargazer/tariff_impl.cpp @@ -145,8 +145,11 @@ else return tariffData.dirPrice[dir].priceDayA; } //----------------------------------------------------------------------------- -std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to) const +std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to, time_t currentTime) const { +time_t timeout = GetChangePolicyTimeout(); +if ((currentTime > timeout) && (timeout != 0)) + return ""; switch (GetChangePolicy()) { case TARIFF::ALLOW: -- 2.43.2