From e4a9d6001b8a8d85b6de56d4ed2b9e35d389a80a Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Tue, 17 Jul 2012 14:49:20 +0000 Subject: [PATCH] Avoid "Cannot autoload UNDEFINED", if the autoloaded module has syntax errors git-svn-id: https://svn.fhem.de/fhem/trunk@1736 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index ed7e018af..6d54bfe71 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -2379,7 +2379,8 @@ Dispatch($$$) my ($order, $mname) = split(":", $m); if($attr{global}{autoload_undefined_devices}) { - $mname = LoadModule($mname); + my $newm = LoadModule($mname); + $mname = $newm if($newm ne "UNDEFINED"); if($modules{$mname} && $modules{$mname}{ParseFn}) { no strict "refs"; @found = &{$modules{$mname}{ParseFn}}($hash,$dmsg);