]> git.stg.codes - stg.git/commitdiff
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 a3084fbcd810c781fdd895be95c6148b797400f1..c8a0161c6deddb67f67677e3945a2b25ed7cb306 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: