From 6452b1f76738fcdd4cd1d3700f730847753733eb Mon Sep 17 00:00:00 2001 From: markusbloch Date: Tue, 11 Nov 2014 21:09:42 +0000 Subject: [PATCH] PRESENCE: fixing race condition of failed re-init after removed disabled attribute git-svn-id: https://svn.fhem.de/fhem/trunk@6950 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 2 ++ fhem/FHEM/73_PRESENCE.pm | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index c153a5ee6..2a054d8fb 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: PRESENCE: fix race condition, when delete disabled attribute and + PRESENCE does not start to scan. - added: OPENWEATHER: captures weather forecast from API of www.wetter.com - fhem 5.6 released diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 7ce944927..f771b63e2 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -373,14 +373,14 @@ PRESENCE_Attr(@) if(defined($hash->{DeviceName})) { + $hash->{helper}{DISABLED} = 0; + if(defined($hash->{FD})) { PRESENCE_DoInit($hash) if(exists($hash->{helper}{DISABLED})); - $hash->{helper}{DISABLED} = 0; } else { - $hash->{helper}{DISABLED} = 0; DevIo_OpenDev($hash, 0, "PRESENCE_DoInit"); } }