Ticket 37. The timeout variable added, if(stgTime > timeout && timeout
authorElena Mamontova <helenh463@gmail.com>
Thu, 27 Oct 2016 13:17:04 +0000 (16:17 +0300)
committerElena Mamontova <helenh463@gmail.com>
Thu, 27 Oct 2016 13:17:04 +0000 (16:17 +0300)
!= 0) construction added in the TariffChangeIsAllowed() function.

projects/stargazer/tariff_impl.cpp

index a3084fb..c8a0161 100644 (file)
@@ -147,6 +147,9 @@ else
 //-----------------------------------------------------------------------------
 std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to) const
 {
+time_t timeout = GetChangePolicyTimeout();
+if (stgTime > timeout && timeout != 0)
+    return "";
 switch (GetChangePolicy())
     {
     case TARIFF::ALLOW: