From ebe918c8a62e8e5821a3a8a795384dd4db76221b Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 21 Oct 2016 05:59:01 +0000 Subject: [PATCH] 00_FBAHAHTTP.pm: fix endless recursion. (Froum #58147) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12390 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/00_FBAHAHTTP.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FHEM/00_FBAHAHTTP.pm b/FHEM/00_FBAHAHTTP.pm index eaf6b3337..8c1cd41d0 100644 --- a/FHEM/00_FBAHAHTTP.pm +++ b/FHEM/00_FBAHAHTTP.pm @@ -81,6 +81,7 @@ FBAHAHTTP_connect($) "check connection/hostname/fritzbox-user/password") } + delete($hash->{RetriedCmd}); delete($readyfnlist{"$name.$dev"}); $hash->{".SID"} = $sid; $hash->{STATE} = "connected"; @@ -207,17 +208,17 @@ FBAHAHTTP_ProcessStack($) Log3 $name, 5, "FBAHAHTTP_Write reply for $name: $_[2]"; if(!defined($_[2]) || $_[2] eq "") { - if($hash->{INRETRY}) { + if($hash->{RetriedCmd}) { Log3 $name, 1, "No sensible respone after reconnect, giving up"; return; } - $hash->{INRETRY} = 1; return if(FBAHAHTTP_connect($hash)); + $hash->{RetriedCmd} = $msg; FBAHAHTTP_ProcessStack($hash); - delete($hash->{INRETRY}); return; } + delete($hash->{RetriedCmd}); shift @{$hash->{CmdStack}}; if(@{$hash->{CmdStack}} > 0) { my $ad = AttrVal($name, "async_delay", 0);