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 80212b56ae
commit cf1c3b08d5

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";