2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 06:48:43 +00:00

FRITZBOX: robustness improved

git-svn-id: https://svn.fhem.de/fhem/trunk@10965 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
grompo 2016-02-29 18:59:56 +00:00
parent 67f2109d00
commit b17c664861

View File

@ -37,10 +37,10 @@ package main;
use strict;
use warnings;
use Blocking;
my $missingModul;
my $missingModulTelnet;
my $missingModulWeb;
my $missingModulTR064;
my $missingModul = "";
my $missingModulTelnet = "";
my $missingModulWeb = "";
my $missingModulTR064 = "";
our $FRITZBOX_TR064pwd;
our $FRITZBOX_TR064user;
@ -1403,7 +1403,7 @@ sub FRITZBOX_Readout_Run_Web($)
$wlanCount++ if $_->{wlan} == 1;
}
# else if the device is not online anymore, set the mac readings to 'inactive' and delete at next readout
elsif (exists $hash->{READINGS}{$rName}) {
elsif (exists $hash->{READINGS}{$rName}{VAL}) {
if ($hash->{READINGS}{$rName}{VAL} ne "inactive") {
FRITZBOX_Readout_Add_Reading $hash, \@roReadings, $rName, "inactive";
}
@ -1575,6 +1575,7 @@ sub FRITZBOX_Readout_Done($)
sub FRITZBOX_Readout_Process($$)
{
my ($hash,$string) = @_;
# Fatal Error: no hash parameter handed over
unless (defined $hash) {
Log 1, "Fatal Error: no hash parameter handed over";
return;
@ -1653,7 +1654,7 @@ sub FRITZBOX_Readout_Process($$)
readingsBulkUpdate( $hash, $rName, $rValue );
FRITZBOX_Log $hash, 5, "SET $rName = '$rValue'";
}
elsif ( exists( $hash->{READINGS}{$rName} ) ) {
elsif ( exists $hash->{READINGS}{$rName} ) {
delete $hash->{READINGS}{$rName};
FRITZBOX_Log $hash, 5, "Delete reading $rName.";
}