Revision: 5841
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5841&view=rev
Author:   eoberlander
Date:     2011-09-11 12:29:36 +0000 (Sun, 11 Sep 2011)
Log Message:
-----------
Add code for a corner case where NEXT_SWITCH_HOUR/MINUTE would not be set 
correctly.

Modified Paths:
--------------
    ipcop/trunk/src/scripts/puzzleFwRules.pl

Modified: ipcop/trunk/src/scripts/puzzleFwRules.pl
===================================================================
--- ipcop/trunk/src/scripts/puzzleFwRules.pl    2011-09-11 08:01:14 UTC (rev 
5840)
+++ ipcop/trunk/src/scripts/puzzleFwRules.pl    2011-09-11 12:29:36 UTC (rev 
5841)
@@ -401,8 +401,19 @@
 
                 # current hour is the same as End Hour
 
-                # end minute is in future but nearer then switch minute
+                # but, when switchHour is in future, and Start Minute
+                # (switchMinute) is less than End Minute...
+                # e.g. from 13:15 to 12:45, at 12:30
                 if (   $minute < $rule->{'END_MINUTE'}
+                    && $switchHour > $rule->{'END_HOUR'} )
+                {
+                    $update       = 1;
+                    $switchHour   = $rule->{'END_HOUR'};
+                    $switchMinute = $rule->{'END_MINUTE'};
+                }
+
+                # end minute is in future but nearer than switch minute
+                if (   $minute < $rule->{'END_MINUTE'}
                     && $rule->{'END_MINUTE'} < $switchMinute)
                 {
                     $update       = 1;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to