configDB.pm - added: return $ret from AnalyzeCommandChain

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5111 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2014-03-03 18:12:27 +00:00
parent 81acc5286f
commit b112ff3301

View File

@ -270,12 +270,14 @@ sub cfgDB_InsertLine($$$) {
sub cfgDB_Execute($@) { sub cfgDB_Execute($@) {
my ($cl, @dbconfig) = @_; my ($cl, @dbconfig) = @_;
my $ret;
foreach (@dbconfig){ foreach (@dbconfig){
my $l = $_; my $l = $_;
$l =~ s/[\r\n]//g; $l =~ s/[\r\n]//g;
AnalyzeCommandChain($cl, $l); $ret .= AnalyzeCommandChain($cl, $l);
} }
return; return $ret if($ret);
return undef;
} }
sub cfgDB_SaveCfg { sub cfgDB_SaveCfg {
@ -447,13 +449,15 @@ sub cfgDB_Rotate($) {
sub cfgDB_ReadAll($){ sub cfgDB_ReadAll($){
my ($cl) = @_; my ($cl) = @_;
my $ret;
# add Config Rows to commandfile # add Config Rows to commandfile
my @dbconfig = cfgDB_ReadCfg(@dbconfig); my @dbconfig = cfgDB_ReadCfg(@dbconfig);
# add State Rows to commandfile # add State Rows to commandfile
@dbconfig = cfgDB_ReadState(@dbconfig); @dbconfig = cfgDB_ReadState(@dbconfig);
# AnalyzeCommandChain for all entries # AnalyzeCommandChain for all entries
cfgDB_Execute($cl, @dbconfig); $ret .= cfgDB_Execute($cl, @dbconfig);
return; return $ret if($ret);
return undef;
} }
sub cfgDB_Migrate { sub cfgDB_Migrate {