mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
00_HMlan:set state after restart correct
git-svn-id: https://svn.fhem.de/fhem/trunk@13605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6c1507a424
commit
5cb2f45e83
@ -1028,7 +1028,7 @@ sub HMLAN_KeepAliveCheck($) {##################################################
|
||||
my $hash = $defs{$name};
|
||||
if ($hash->{helper}{q}{keepAliveRec} != 1){# no answer
|
||||
if ($hash->{helper}{q}{keepAliveRpt} >2){# give up here
|
||||
HMLAN_condUpdate($hash,252);# trigger timeout event
|
||||
HMLAN_condUpdate($hash,253);# trigger timeout event
|
||||
DevIo_Disconnected($hash);
|
||||
}
|
||||
else{
|
||||
@ -1038,8 +1038,8 @@ sub HMLAN_KeepAliveCheck($) {##################################################
|
||||
}
|
||||
else{
|
||||
$hash->{helper}{q}{keepAliveRpt} = 0;
|
||||
HMLAN_condUpdate($hash,0) if ($hash->{helper}{q}{HMcndN} == 255);
|
||||
}
|
||||
|
||||
}
|
||||
sub HMLAN_secSince2000() {#####################################################
|
||||
# Calculate the local time in seconds from 2000.
|
||||
@ -1090,6 +1090,11 @@ sub HMLAN_clearQ($) {#clear pending acks due to timeout########################
|
||||
sub HMLAN_condUpdate($$) {#####################################################
|
||||
my($hash,$HMcnd) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
if (AttrVal($name,"dummy",undef)){
|
||||
readingsUpdateSingle($hash,"state","disconnected");
|
||||
$hash->{XmitOpen} = 0;
|
||||
return;
|
||||
}
|
||||
my $hashCnd = $hash->{helper}{cnd};#short to helper
|
||||
my $hashQ = $hash->{helper}{q};#short to helper
|
||||
$hash->{helper}{cnd}{$HMcnd} = 0 if (!$hash->{helper}{cnd} ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user