From 17c604a1ee53e91ce4216e7d3379e87b5173de7f Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 11 Jul 2021 14:35:40 +0000 Subject: [PATCH] fhem.pl: make some global variables private git-svn-id: https://svn.fhem.de/fhem/trunk@24728 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/86_FS10.pm | 2 +- fhem/fhem.pl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/contrib/86_FS10.pm b/fhem/contrib/86_FS10.pm index 29aaa710b..7d63ca83e 100644 --- a/fhem/contrib/86_FS10.pm +++ b/fhem/contrib/86_FS10.pm @@ -160,7 +160,7 @@ FS10Log($$) #define n31 notify fs10 {FS10Log("@", "%")} #define here notify action - Log 2,"FS10 $a1 = $a2 old: $oldvalue{$a1}{TIME}=> $oldvalue{$a1}{VAL});"; + Log 2,"FS10 $a1 = $a2 old: ".OldTimestamp($a1)." => ".OldTimestamp($a1); } 1; diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 50563539d..72a327e26 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -243,7 +243,6 @@ use vars qw($internal_data); # FileLog/DbLog -> SVG data transport use vars qw($lastDefChange); # number of last def/attr change use vars qw($lastWarningMsg); # set by the warnings-sub use vars qw($nextat); # Time when next timer will be triggered. -use vars qw($readytimeout); # Polling interval. UNIX: device search only use vars qw($reread_active); use vars qw($selectTimestamp); # used to check last select exit timestamp use vars qw($winService); # the Windows Service object @@ -258,7 +257,6 @@ use vars qw(%intAt); # Internal timer hash, used by apptime use vars qw(%logInform); # Used by FHEMWEB/Event-Monitor use vars qw(%modules); # List of loaded modules (device/log/etc) use vars qw(%ntfyHash); # hash of devices needed to be notified. -use vars qw(%oldvalue); # Old values, see commandref.html use vars qw(%prioQueues); # use vars qw(%readyfnlist); # devices which want a "readyfn" use vars qw(%selectlist); # devices which want a "select" @@ -293,6 +291,7 @@ my $namedef = "where is a single device name, a list separated by comma ( my $rcvdquit; # Used for quit handling in init files my $readingsUpdateDelayTrigger; # needed internally my $gotSig; # non-undef if got a signal +my %oldvalue; # Old values, see commandref.html my $wbName = ".WRITEBUFFER"; # Buffer-name for delayed writing via select my %comments; # Comments from the include files my %duplicate; # Pool of received msg for multi-fhz/cul setups @@ -302,9 +301,10 @@ my %delayedShutdowns; # definitions needing delayed shutdown my %fuuidHash; # for duplicate checking my $globalUniqueID; # cache it +my $readytimeout = ($^O eq "MSWin32") ? 0.1 : 5.0; + $init_done = 0; $lastDefChange = 0; -$readytimeout = ($^O eq "MSWin32") ? 0.1 : 5.0; $featurelevel = 6.0; # see also GlobalAttr $numCPUs = `grep -c ^processor /proc/cpuinfo 2>&1` if($^O eq "linux"); $numCPUs = ($numCPUs && $numCPUs =~ m/(\d+)/ ? $1 : 1);