2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 16:59:18 +00:00

PRESENCE: try to fix flapping active state (Forum #27255)

git-svn-id: https://svn.fhem.de/fhem/trunk@6621 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2014-09-26 15:11:20 +00:00
parent 103ad6a4b2
commit e72398b5e4

View File

@ -219,8 +219,9 @@ PRESENCE_Define($$)
if($hash->{MODE} =~ /(lan-ping|local-bluetooth|fritzbox|shellscript|function)/)
{
delete $hash->{helper}{RUNNING_PID} if(defined($hash->{helper}{RUNNING_PID}));
RemoveInternalTimer($hash);
InternalTimer(gettimeofday()+2, "PRESENCE_StartLocalScan", $hash, 0) unless($hash->{helper}{DISABLED});
InternalTimer(gettimeofday(), "PRESENCE_StartLocalScan", $hash, 0) unless($hash->{helper}{DISABLED});
return;
}
@ -519,7 +520,7 @@ sub PRESENCE_StartLocalScan($;$)
return;
}
$hash->{STATE} = "active" if($hash->{STATE} eq "???" or "defined");
$hash->{STATE} = "active" if($hash->{STATE} eq "???" or $hash->{STATE} eq "defined");
if($local == 0)
{