mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 01:46:08 +00:00
fhem.pl: reset .clientArray for multiple IOdev (Forum #127565)
git-svn-id: https://svn.fhem.de/fhem/trunk@26027 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b627569f74
commit
36f39a3d77
16
fhem/fhem.pl
16
fhem/fhem.pl
@ -2162,6 +2162,22 @@ CommandDefine($$)
|
||||
addStructChange("define", $name, $def) if(!$opt{silent});
|
||||
DoTrigger("global", "DEFINED $name", 1);
|
||||
}
|
||||
|
||||
if($init_done && $modules{$m}{Match}) { # reset multiple IOdev, #127565
|
||||
foreach my $an (keys %defs) {
|
||||
my $ah = $defs{$an};
|
||||
my $cl = $ah->{Clients};
|
||||
$cl = $modules{$ah->{TYPE}}{Clients} if(!$cl);
|
||||
next if(!$cl || !$ah->{'.clientArray'});
|
||||
foreach my $cmRe ( split(/:/, $cl) ) {
|
||||
if($m =~ $cmRe) {
|
||||
delete($ah->{'.clientArray'});
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return ($ret && $opt{ignoreErr} ?
|
||||
"Cannot define $name, remove -ignoreErr for details" : $ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user