From b9e36c1f16bc7104b8ebbe5a1eff81aa79b65d3e Mon Sep 17 00:00:00 2001 From: fhemzap <> Date: Wed, 14 Dec 2016 19:13:13 +0000 Subject: [PATCH] HMCCU: Bugfix for memory leak git-svn-id: https://svn.fhem.de/fhem/trunk@12777 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/88_HMCCU.pm | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 7b3f80253..5dab26040 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 88_HMCCU: Fixed memory leak in RPC server - feature: 01_FHEMWEB: Dump "Probably associated with" in Raw definition - bugfix: 93_DbRep: added balance diff to diffValue, balance diff to next period if value is 0 between two periods with values diff --git a/fhem/FHEM/88_HMCCU.pm b/fhem/FHEM/88_HMCCU.pm index 42256c830..f84a84b00 100755 --- a/fhem/FHEM/88_HMCCU.pm +++ b/fhem/FHEM/88_HMCCU.pm @@ -4742,14 +4742,9 @@ sub HMCCU_EncodeEPDisplay ($) my $hmccu_child; # Queue file -my $queue; my %child_queue; my $cpqueue = \%child_queue; -# In-Memory queue -my @evqueue; -my $evq_lock = 0; - # Statistic data of child process my %child_hash = ( "total", 0, @@ -4783,12 +4778,6 @@ sub HMCCU_CCURPC_Write ($$) # SUBPROCESS HMCCU_QueueEnq ($cpqueue, $et."|".$msg); - if (!$evq_lock) { - $evq_lock = 1; - push (@evqueue, $et."|".$msg); - $evq_lock = 0; - } - # SUBPROCESS # Log3 $name, 1, "CCURPC: Write $et $msg"; # my $bytes = $hmccu_child->writeToParent ($et."|".$msg); @@ -5096,15 +5085,6 @@ sub HMCCU_CCURPC_GetEventsCB ($$) $cb = "unknown" if (!defined ($cb)); Log3 $name, 1, "CCURPC: $cb GetEvents"; - if (scalar (@evqueue) > 0 && !$evq_lock) { - $evq_lock = 1; - @result = @evqueue; - @evqueue = (); - $evq_lock = 0; - - return \@result; - } - return undef; }