2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 05:06:35 +00:00

Autoloading problem: if no device of a given type is specified, its module is

not loaded, so the Match entry of the module is not set.
-> No way to report unknown devices of a certain type if you not have some
   device already defined.


git-svn-id: https://svn.fhem.de/fhem/trunk@224 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2008-08-04 15:06:58 +00:00
parent 41844a01ec
commit 63fc47f453

View File

@ -520,7 +520,7 @@ FHZ_Read($)
my ($hash) = @_;
my $buf = $hash->{PortObj}->input();
my $iohash = $modules{$hash->{TYPE}};
my $iohash = $modules{$hash->{TYPE}}; # Our (FHZ) module pointer
my $name = $hash->{NAME};
###########
@ -623,7 +623,10 @@ FHZ_Read($)
foreach my $m (sort { $modules{$a}{ORDER} cmp $modules{$b}{ORDER} }
grep {defined($modules{$_}{ORDER});}keys %modules) {
next if($iohash->{Clients} !~ m/:$m:/);
next if($dmsg !~ m/$modules{$m}{Match}/i);
# Module is not loaded or the message is not for this module
next if(!$modules{$m}{Match} || $dmsg !~ m/$modules{$m}{Match}/i);
no strict "refs";
@found = &{$modules{$m}{ParseFn}}($hash,$dmsg);
use strict "refs";