2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

fhem.pl: introduce devcountTemp (Forum #135966)

git-svn-id: https://svn.fhem.de/fhem/trunk@28227 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2023-11-29 12:33:32 +00:00
parent ba23d9293f
commit 9c54e00fef
2 changed files with 7 additions and 3 deletions

View File

@ -342,7 +342,7 @@ TcpServer_Accept($$)
my $cname = "${name}_${caddr}_${port}";
my %nhash;
$nhash{NR} = $devcount++;
$nhash{NR} = $devcountTemp++;
$nhash{NAME} = $cname;
$nhash{PEER} = $caddr;
$nhash{PORT} = $port;

View File

@ -236,8 +236,9 @@ sub cfgDB_FileWrite;
use vars qw($addTimerStacktrace);# set to 1 by fhemdebug
use vars qw($auth_refresh);
use vars qw($cmdFromAnalyze); # used by the warnings-sub
use vars qw($devcount); # Maximum device number, used for storing
use vars qw($devcount); # Maximum device number, used for storing.
use vars qw($devcountPrioSave); # Maximum prioSave device number
use vars qw($devcountTemp); # number for temp devices like client connect
use vars qw($unicodeEncoding); # internal encoding is unicode (wide character)
use vars qw($featurelevel);
use vars qw($fhemForked); # 1 in a fhemFork()'ed process, else undef
@ -252,6 +253,7 @@ use vars qw($nextat); # Time when next timer will be triggered.
use vars qw($numCPUs); # Number of CPUs on Linux, else 1
use vars qw($reread_active);
use vars qw($selectTimestamp); # used to check last select exit timestamp
use vars qw($tmpdevcount); # Maximum device number, used for storing
use vars qw($winService); # the Windows Service object
use vars qw(%attr); # Attributes
@ -2144,7 +2146,8 @@ CommandDefine($$)
$hash{DEF} = $a[2] if(int(@a) > 2);
#130588: start early after next save, for a small SubProcess size
$hash{NR} = ($modules{$m}{prioSave} && $devcountPrioSave < 30) ?
$devcountPrioSave++ : $devcount++;
$devcountPrioSave++ :
($opt{temporary} ? $devcountTemp++ : $devcount++);
$hash{CFGFN} = $currcfgfile
if($currcfgfile ne AttrVal("global", "configfile", "") &&
!configDBUsed());
@ -4044,6 +4047,7 @@ doGlobalDef($)
$devcountPrioSave = 2;
$devcount = 30;
$devcountTemp = 10000000;
}
#####################################