/[smecontribs]/rpms/smeserver-affa/contribs9/smeserver-affa-fix-show-schedule.patch
ViewVC logotype

Contents of /rpms/smeserver-affa/contribs9/smeserver-affa-fix-show-schedule.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Apr 10 19:08:54 2017 UTC (7 years, 6 months ago) by guedel
Branch: MAIN
CVS Tags: smeserver-affa-3_2_2_3-8_el6_sme, HEAD
* Mon Apr 10 2017 Arnaud Guillaume <smeserver-affa@guedel.eu> 3.2.2.3-8.sme
- Fix issue when multiple times are in an Affa configuration file, show-schedule only displays the last [SME: 10196]

1 diff -Nur smeserver-affa-3.2.2.3.old/root/sbin/affa smeserver-affa-3.2.2.3/root/sbin/affa
2 --- smeserver-affa-3.2.2.3.old/root/sbin/affa 2017-04-10 17:44:55.073000764 +0200
3 +++ smeserver-affa-3.2.2.3/root/sbin/affa 2017-04-09 17:55:24.000000000 +0200
4 @@ -10,7 +10,7 @@
5 # This is free software, and you are welcome to redistribute it
6 # under certain conditions; type 'affa --license' for details.
7 #----------------------------------------------------------------------
8 -my $VERSION='3.2.2.3-6';
9 +my $VERSION='3.2.2.3-8';
10 #----------------------------------------------------------------------
11
12 use strict;
13 @@ -2922,7 +2922,6 @@
14 #######################################################################################################################################
15 ####################### debut des modifs faites dans la dernière ligne de la commande @cmd précédente
16 #
17 -#
18 # ajout de $job{'remoteHostName'} eq 'localhost' ? ":/$k" :
19 #
20 ######################### fin des modifs
21 @@ -3258,6 +3257,24 @@
22 $ts[$i] =~ /(..)(..)/;
23 $ts[$i] = $1*60+$2;
24 }
25 +
26 +### fix bug 10196
27 +my @am;
28 +my @pm;
29 +
30 +while (@ts) {
31 + my $t=shift @ts;
32 + if ($t <= 720) {
33 + push(@am, $t);
34 + } else {
35 + push(@pm, $t);
36 + }
37 +}
38 +push (@ts,@pm);
39 +push (@ts,@am);
40 +
41 +## end fix bug 10196
42 +
43 # Kill at
44 my $killat=-1;
45 if( $job{'killAt'} ) {
46 @@ -3279,11 +3296,29 @@
47 $out{$jn}.="K";
48 } elsif( $resumeat >= $i && $resumeat < $i+$res ) {
49 $out{$jn}.="R";
50 - } elsif( $t >= $i && $t < $i+$res ) {
51 - $out{$jn}.="S";
52 - while( @ts && $t < $i+$res ) {
53 - $t=shift @ts;
54 - }
55 +####### next line modified: fix bug 10196
56 +# } elsif( $t >= $i && $t < $i+$res ) {
57 + } elsif( $t && $t >= $i && $t < $i+$res ) {
58 + if( $t >= $i && $t < $i+$res ) {
59 + $out{$jn}.="S";
60 +
61 +
62 +###### 3 next lines: fix bug 10196
63 +# while( @ts && $t < $i+$res ) {
64 +# $t=shift @ts;
65 +# }
66 +##### replaced through:
67 + while( @ts && $t < 720 && $t < $i+$res ) {
68 + $t=shift @ts;
69 + }
70 +
71 +
72 + while( @ts && $t >= 720 && $t < $i+$res ) {
73 + $t=shift @ts;
74 + }
75 + }
76 +## end fix bug 10196
77 +
78 } elsif( $i >= $s1 && $i< $e1 or $i >= $s2 && $i< $e2 ) {
79 $out{$jn}.="=";
80 } elsif( $dedup && ($i >= $ds1 && $i< $de1 or $i >= $ds2 && $i< $de2) ) {

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed