2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

fhem.pl: allow addStructChange without device (Forum #111052)

git-svn-id: https://svn.fhem.de/fhem/trunk@21916 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-05-11 19:32:12 +00:00
parent 9eff6ce65a
commit b7235cba9d

View File

@ -5557,14 +5557,13 @@ setKeyValue($$)
sub
addStructChange($$$)
{
return if(!$init_done);
my ($cmd, $dev, $param) = @_;
return if(!$defs{$dev} || $defs{$dev}{TEMPORARY});
return if(!$init_done);
return if(defined($dev) &&
(!$defs{$dev} || $defs{$dev}{TEMPORARY} || $defs{$dev}{VOLATILE}));
$lastDefChange++;
return if($defs{$dev}{VOLATILE});
shift @structChangeHist
if(@structChangeHist > AttrVal('global', 'maxChangeLog', 10) - 1);
$param = substr($param, 0, 40)."..." if(length($param) > 40);