Fixes #2992. If no definition for a monitor is found, don't modify it.
This commit is contained in:
parent
ed39ffeeb6
commit
0d7fe79b27
|
@ -108,13 +108,12 @@ if ( $command eq 'state' ) {
|
|||
if ( $monitor->{Id} =~ /^$definition->{Id}$/ ) {
|
||||
$monitor->{NewFunction} = $definition->{Function};
|
||||
$monitor->{NewEnabled} = $definition->{Enabled};
|
||||
last;
|
||||
}
|
||||
}
|
||||
#next if ( !$monitor->{NewFunction} );
|
||||
$monitor->{NewFunction} = 'None'
|
||||
if ( !$monitor->{NewFunction} );
|
||||
$monitor->{NewEnabled} = 0
|
||||
if ( !$monitor->{NewEnabled} );
|
||||
next if ! exists $monitor->{NewFunction};
|
||||
$monitor->{NewFunction} = 'None' if !$monitor->{NewFunction};
|
||||
$monitor->{NewEnabled} = 0 if !$monitor->{NewEnabled};
|
||||
if ( $monitor->{Function} ne $monitor->{NewFunction}
|
||||
|| $monitor->{Enabled} ne $monitor->{NewEnabled}
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue