mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
CUL_HM:async output correction
git-svn-id: https://svn.fhem.de/fhem/trunk@10013 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
862b2ba5c0
commit
25fbf194a0
@ -251,28 +251,34 @@ sub HMLAN_Attr(@) {############################################################
|
||||
elsif($aName eq "logIDs"){
|
||||
if ($cmd eq "set"){
|
||||
if ($init_done){
|
||||
my @ids = split",",$aVal;
|
||||
my @idName;
|
||||
if (grep /sys/,@ids){
|
||||
push @idName,"sys";
|
||||
$defs{$name}{helper}{log}{sys}=1;
|
||||
if ($aVal){
|
||||
my @ids = split",",$aVal;
|
||||
my @idName;
|
||||
if (grep /sys/,@ids){
|
||||
push @idName,"sys";
|
||||
$defs{$name}{helper}{log}{sys}=1;
|
||||
}
|
||||
else{
|
||||
$defs{$name}{helper}{log}{sys}=0;
|
||||
}
|
||||
if (grep /all/,@ids){
|
||||
push @idName,"all";
|
||||
$defs{$name}{helper}{log}{all}=1;
|
||||
}
|
||||
else{
|
||||
$defs{$name}{helper}{log}{all}=0;
|
||||
$_=substr(CUL_HM_name2Id($_),0,6) foreach(grep !/^$/,@ids);
|
||||
$_="" foreach(grep !/^[A-F0-9]{6}$/,@ids);
|
||||
@ids = HMLAN_noDup(@ids);
|
||||
push @idName,CUL_HM_id2Name($_) foreach(@ids);
|
||||
}
|
||||
$attr{$name}{$aName} = join(",",@idName);
|
||||
@{$defs{$name}{helper}{log}{ids}}=grep !/^(sys|all)$/,@ids;
|
||||
}
|
||||
else{
|
||||
$defs{$name}{helper}{log}{sys}=0;
|
||||
$attr{$name}{$aName} = "";
|
||||
@{$defs{$name}{helper}{log}{ids}}=();
|
||||
}
|
||||
if (grep /all/,@ids){
|
||||
push @idName,"all";
|
||||
$defs{$name}{helper}{log}{all}=1;
|
||||
}
|
||||
else{
|
||||
$defs{$name}{helper}{log}{all}=0;
|
||||
$_=substr(CUL_HM_name2Id($_),0,6) foreach(grep !/^$/,@ids);
|
||||
$_="" foreach(grep !/^[A-F0-9]{6}$/,@ids);
|
||||
@ids = HMLAN_noDup(@ids);
|
||||
push @idName,CUL_HM_id2Name($_) foreach(@ids);
|
||||
}
|
||||
$attr{$name}{$aName} = join(",",@idName);
|
||||
@{$defs{$name}{helper}{log}{ids}}=grep !/^(sys|all)$/,@ids;
|
||||
}
|
||||
else{
|
||||
$defs{$name}{helper}{attrPend} = 1;
|
||||
|
@ -1131,12 +1131,18 @@ sub HMinfo_GetFn($@) {#########################################################
|
||||
$ret = $cmd." done:" .HMinfo_peerCheck(@entities);
|
||||
}
|
||||
elsif($cmd eq "configCheck"){##check peers and register----------------------
|
||||
my $id = ++$hash->{nb}{cnt};
|
||||
my $bl = BlockingCall("HMinfo_configCheck", join(",",("$name;$id;$hash->{CL}{NAME}",$opt,$filter)),
|
||||
"HMinfo_bpPost", 30,
|
||||
"HMinfo_bpAbort", "$name:0");
|
||||
$hash->{nb}{$id}{$_} = $bl->{$_} foreach (keys %{$bl});
|
||||
$ret = "";
|
||||
if ($hash->{CL}){
|
||||
my $id = ++$hash->{nb}{cnt};
|
||||
my $bl = BlockingCall("HMinfo_configCheck", join(",",("$name;$id;$hash->{CL}{NAME}",$opt,$filter)),
|
||||
"HMinfo_bpPost", 30,
|
||||
"HMinfo_bpAbort", "$name:0");
|
||||
$hash->{nb}{$id}{$_} = $bl->{$_} foreach (keys %{$bl});
|
||||
$ret = "";
|
||||
}
|
||||
else{
|
||||
$ret = HMinfo_configCheck (join(",",("$name;;",$opt,$filter)));
|
||||
$ret =~s/-ret-/\n/g;
|
||||
}
|
||||
}
|
||||
elsif($cmd eq "templateChk"){##template: see if it applies ------------------
|
||||
my $id = ++$hash->{nb}{cnt};
|
||||
|
Loading…
Reference in New Issue
Block a user