2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 16:59:18 +00:00

10_DUOFERNSTICK: fix uninitialized values

git-svn-id: https://svn.fhem.de/fhem/trunk@10735 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
telekatz 2016-02-06 10:19:32 +00:00
parent 762517c3e7
commit 3bf9679a95

View File

@ -354,6 +354,8 @@ DUOFERNSTICK_DoInit($)
push(@pairs, $code) if(length($code) == 6);
}
$hash->{helper}{cmdEx} = 0;
@{$hash->{cmdStack}} = ();
return undef if (!$init_done);
@ -402,9 +404,6 @@ DUOFERNSTICK_DoInit($)
next if($err);
DUOFERNSTICK_SimpleWrite($hash, $duoACK);
$hash->{helper}{cmdEx} = 0;
@{$hash->{cmdStack}} = ();
readingsSingleUpdate($hash, "state", "Initialized", 1);
return undef;
}
@ -520,7 +519,7 @@ DUOFERNSTICK_Notify($$)
next if(!defined($s));
my ($what,$who) = split(' ',$s);
if ( $what =~ m/INITIALIZED/ ) {
if ($what && ($what =~ m/INITIALIZED/)) {
DUOFERNSTICK_DoInit($own);
}
}