fhem.pl: optional AssignIODev Parameter (proposed)

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

11
fhem.pl
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) {