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

fhem.pl: optional AssignIODev Parameter (proposed)

git-svn-id: https://svn.fhem.de/fhem/trunk@4254 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-11-20 13:04:27 +00:00
parent f90754a091
commit c214e97672

View File

@ -44,7 +44,7 @@ sub AnalyzeCommand($$);
sub AnalyzeCommandChain($$);
sub AnalyzeInput($);
sub AnalyzePerlCommand($$);
sub AssignIoPort($);
sub AssignIoPort($;$);
sub AttrVal($$$);
sub CallFn(@);
sub CheckDuplicate($$@);
@ -1471,10 +1471,15 @@ CommandModify($$)
#############
# internal
sub
AssignIoPort($)
AssignIoPort($;$)
{
my ($hash) = @_;
my ($hash, $proposed) = @_;
if($proposed && $defs{$proposed}) {
$hash->{IODev} = $defs{$proposed};
delete($defs{$proposed}{".clientArray"});
return;
}
# Set the I/O device, search for the last compatible one.
for my $p (sort { $defs{$b}{NR} <=> $defs{$a}{NR} } keys %defs) {