Avoiding recursive watchdog entries
git-svn-id: https://svn.fhem.de/fhem/trunk@268 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -59,6 +59,7 @@ watchdog_Notify($$)
|
|||||||
|
|
||||||
my $ln = $ntfy->{NAME};
|
my $ln = $ntfy->{NAME};
|
||||||
return "" if($attr{$ln} && $attr{$ln}{disable});
|
return "" if($attr{$ln} && $attr{$ln}{disable});
|
||||||
|
return "" if($ntfy->{INWATCHDOG});
|
||||||
|
|
||||||
my $n = $dev->{NAME};
|
my $n = $dev->{NAME};
|
||||||
my $re1 = $ntfy->{RE1};
|
my $re1 = $ntfy->{RE1};
|
||||||
@@ -91,8 +92,10 @@ watchdog_Trigger($)
|
|||||||
my ($ntfy) = @_;
|
my ($ntfy) = @_;
|
||||||
Log(3, "Watchdog $ntfy->{NAME} triggered");
|
Log(3, "Watchdog $ntfy->{NAME} triggered");
|
||||||
my $exec = SemicolonEscape($ntfy->{CMD});;
|
my $exec = SemicolonEscape($ntfy->{CMD});;
|
||||||
AnalyzeCommandChain(undef, $exec);
|
|
||||||
$ntfy->{STATE} = "triggered";
|
$ntfy->{STATE} = "triggered";
|
||||||
|
$ntfy->{INWATCHDOG} = 1;
|
||||||
|
AnalyzeCommandChain(undef, $exec);
|
||||||
|
$ntfy->{INWATCHDOG} = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
|
|||||||
Reference in New Issue
Block a user