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:
@@ -520,7 +520,7 @@ FHZ_Read($)
|
|||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
|
||||||
my $buf = $hash->{PortObj}->input();
|
my $buf = $hash->{PortObj}->input();
|
||||||
my $iohash = $modules{$hash->{TYPE}};
|
my $iohash = $modules{$hash->{TYPE}}; # Our (FHZ) module pointer
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
###########
|
###########
|
||||||
@@ -623,7 +623,10 @@ FHZ_Read($)
|
|||||||
foreach my $m (sort { $modules{$a}{ORDER} cmp $modules{$b}{ORDER} }
|
foreach my $m (sort { $modules{$a}{ORDER} cmp $modules{$b}{ORDER} }
|
||||||
grep {defined($modules{$_}{ORDER});}keys %modules) {
|
grep {defined($modules{$_}{ORDER});}keys %modules) {
|
||||||
next if($iohash->{Clients} !~ m/:$m:/);
|
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";
|
no strict "refs";
|
||||||
@found = &{$modules{$m}{ParseFn}}($hash,$dmsg);
|
@found = &{$modules{$m}{ParseFn}}($hash,$dmsg);
|
||||||
use strict "refs";
|
use strict "refs";
|
||||||
|
|||||||
Reference in New Issue
Block a user