Small CommandReload bug fixed

git-svn-id: https://svn.fhem.de/fhem/trunk@569 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2010-01-29 07:37:47 +00:00
parent 60649956b1
commit 2883f67131

View File

@@ -159,7 +159,7 @@ my $nextat; # Time when next timer will be triggered.
my $intAtCnt=0; my $intAtCnt=0;
my %duplicate; # Pool of received msg for multi-fhz/cul setups my %duplicate; # Pool of received msg for multi-fhz/cul setups
my $duplidx=0; # helper for the above pool my $duplidx=0; # helper for the above pool
my $cvsid = '$Id: fhem.pl,v 1.100 2010-01-21 19:29:47 m_fischer Exp $'; my $cvsid = '$Id: fhem.pl,v 1.101 2010-01-29 07:37:47 rudolfkoenig Exp $';
my $namedef = my $namedef =
"where <name> is either:\n" . "where <name> is either:\n" .
"- a single device name\n" . "- a single device name\n" .
@@ -1317,9 +1317,10 @@ CommandReload($$)
no strict "refs"; no strict "refs";
eval { eval {
my $ret=do "$file"; my $ret=do "$file";
if (!$ret) { if(!$ret) {
Log 1,"Error:Modul $param deactivated:\n $@"; Log 1,"Error:Modul $param deactivated:\n $@";
return "$@"; use strict "refs";
return "$@";
} }
# Get the name of the initialize function. This may differ from the # Get the name of the initialize function. This may differ from the
@@ -1334,12 +1335,10 @@ CommandReload($$)
$ret = &{ "${fnname}_Initialize" }(\%hash); $ret = &{ "${fnname}_Initialize" }(\%hash);
$m = $fnname; $m = $fnname;
}; };
if($@) {
return "$@";
}
use strict "refs"; use strict "refs";
return "$@" if($@);
my ($defptr, $ldata); my ($defptr, $ldata);
if($modules{$m}) { if($modules{$m}) {
$defptr = $modules{$m}{defptr}; $defptr = $modules{$m}{defptr};