mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 07:24:21 +00:00
CUL_HM: parse undefined hashes
git-svn-id: https://svn.fhem.de/fhem/trunk@9159 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8f24f97e8b
commit
14d9008d6d
@ -3351,6 +3351,7 @@ sub CUL_HM_Get($@) {#+++++++++++++++++ get command+++++++++++++++++++++++++++++
|
||||
}
|
||||
elsif($cmd =~ m /^(reg|regVal)$/) { ########################################
|
||||
my (undef,undef,$regReq,$list,$peerId) = @a;
|
||||
return if(!$regReq);
|
||||
if ($regReq eq 'all'){
|
||||
my @regArr = CUL_HM_getRegN($st,$md,($roleD?"00":""),($roleC?$chn:""));
|
||||
|
||||
@ -6226,22 +6227,22 @@ sub CUL_HM_eventP($$) {#handle protocol events
|
||||
# Current Events are Rcv,NACK,IOerr,Resend,ResendFail,Snd
|
||||
# additional variables are protCmdDel,protCmdPend,protState,protLastRcv
|
||||
my ($hash, $evntType) = @_;
|
||||
my $nAttr = $hash;
|
||||
return if (!defined $hash);
|
||||
if ($evntType eq "Rcv"){
|
||||
$nAttr->{"protLastRcv"} = TimeNow();
|
||||
CUL_HM_UpdtReadSingle($hash,".protLastRcv",$nAttr->{"protLastRcv"},0);
|
||||
return;
|
||||
}
|
||||
|
||||
my $evnt = $nAttr->{"prot".$evntType}?$nAttr->{"prot".$evntType}:"0 > x";
|
||||
my $evnt = $hash->{"prot".$evntType}?$hash->{"prot".$evntType}:"0 > x";
|
||||
my ($evntCnt,undef) = split(' last_at:',$evnt);
|
||||
$nAttr->{"prot".$evntType} = ++$evntCnt." last_at:".TimeNow();
|
||||
$hash->{"prot".$evntType} = ++$evntCnt." last_at:".TimeNow();
|
||||
|
||||
if ($evntType =~ m/(Nack|ResndFail|IOerr|dummy)/){# unrecoverable Error
|
||||
CUL_HM_UpdtReadSingle($hash,"state",$evntType,1);
|
||||
$hash->{helper}{prt}{bErr}++;
|
||||
$nAttr->{protCmdDel} = 0 if(!$nAttr->{protCmdDel});
|
||||
$nAttr->{protCmdDel} += scalar @{$hash->{cmdStack}} + 1
|
||||
$hash->{protCmdDel} = 0 if(!$hash->{protCmdDel});
|
||||
$hash->{protCmdDel} += scalar @{$hash->{cmdStack}} + 1
|
||||
if ($hash->{cmdStack});
|
||||
CUL_HM_protState($hash,"CMDs_done");
|
||||
CUL_HM_respPendRm($hash);
|
||||
|
Loading…
x
Reference in New Issue
Block a user