mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
fhem.pl: modify IsDisabled check in AssignIoPort (Forum #89477)
git-svn-id: https://svn.fhem.de/fhem/trunk@17003 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
da83031e8e
commit
5231dba2ee
@ -2066,7 +2066,7 @@ AssignIoPort($;$)
|
|||||||
$proposed = $attr{$hn}{IODev}
|
$proposed = $attr{$hn}{IODev}
|
||||||
if(!$proposed && $attr{$hn} && $attr{$hn}{IODev});
|
if(!$proposed && $attr{$hn} && $attr{$hn}{IODev});
|
||||||
|
|
||||||
if($proposed && $defs{$proposed} && !IsDisabled($proposed)) {
|
if($proposed && $defs{$proposed} && IsDisabled($proposed) != 1) {
|
||||||
$hash->{IODev} = $defs{$proposed};
|
$hash->{IODev} = $defs{$proposed};
|
||||||
$attr{$hn}{IODev} = $proposed if($hasIODevAttr);
|
$attr{$hn}{IODev} = $proposed if($hasIODevAttr);
|
||||||
delete($defs{$proposed}{".clientArray"});
|
delete($defs{$proposed}{".clientArray"});
|
||||||
@ -2075,7 +2075,7 @@ AssignIoPort($;$)
|
|||||||
# Set the I/O device, search for the last compatible one.
|
# Set the I/O device, search for the last compatible one.
|
||||||
for my $p (sort { $defs{$b}{NR} <=> $defs{$a}{NR} } keys %defs) {
|
for my $p (sort { $defs{$b}{NR} <=> $defs{$a}{NR} } keys %defs) {
|
||||||
|
|
||||||
next if(IsDisabled($p));
|
next if(IsDisabled($p) != 1);
|
||||||
my $cl = $defs{$p}{Clients};
|
my $cl = $defs{$p}{Clients};
|
||||||
$cl = $modules{$defs{$p}{TYPE}}{Clients} if(!$cl);
|
$cl = $modules{$defs{$p}{TYPE}}{Clients} if(!$cl);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user